Get Sample Dataframe
Category: Mega-Polis → Gathering → Gathering Data Tools
Node ID:SvMegapolisGetSampleDataframe
Tooltip: Output a sample (toy) Pandas DataFrame for testing
Dependencies:pandas,sklearn
Functionality
Outputs a sample (toy) Pandas DataFrame commonly used for testing and demonstrations.
The node exposes a small curated list of datasets from sklearn.datasets and returns the feature table X as a Pandas DataFrame (the target y is not output).
Available datasets:
iriscalifornia_housingdiabetesdigitswine
Inputs
This node has no inputs.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| dataframe | Enum | iris |
Selects which sample dataset to load from sklearn.datasets. |
Outputs
| Socket | Type | Description |
|---|---|---|
| Dataframe | SvStringsSocket | A Pandas DataFrame containing the dataset features (X). |
Example
Quick test DataFrame for plotting
- Add Get Sample Dataframe
- Set
dataframe = iris - Connect Dataframe output to:
- Seaborn Plot (for a quick scatter/box/violin), or
- Correlation / Correlation With (to inspect relationships), or
- Get Pandas Feature (to extract a column)
Notes
- This node returns only the feature DataFrame (
return_X_y=True, as_frame=Trueand then selects the first item, i.e.,X). - Requires
sklearnavailable in the environment (the node tries to importsklearn.datasets).