DataFrame Utils
Category: Mega-Polis → Analysis → Analysis Data Tools
Node ID:SvMegapolisDataframeUtils
Tooltip: DataFrame Utilities: dropna, fillna, groupby, describe
Dependencies:pandas
Functionality
Provides common Pandas DataFrame utility operations inside Mega-Polis node workflows.
Depending on the selected method, the node can:
- Drop missing values
- Fill missing values
- Group data
- Generate descriptive statistics
This node is intended as a lightweight data-cleaning and summarisation tool before running deeper analyses.
Inputs
| Socket | Type | Description |
|---|---|---|
| Dataframe | SvStringsSocket | Input Pandas DataFrame. Required for execution. |
| Value | SvStringsSocket | Optional value used for operations such as fillna. |
| Column | SvStringsSocket | Optional column name used for grouping operations. |
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Method (dataframe_method) |
Enum | dropna |
Selects which DataFrame operation to perform. |
Available methods
dropnafillnagroupbydescribe
Outputs
| Socket | Type | Description |
|---|---|---|
| Dataframe Out | SvStringsSocket | Resulting Pandas DataFrame (or grouped/aggregated output depending on method). |
Example
Remove missing values
- Connect a DataFrame to Dataframe.
- Set Method to
dropna. - Output: DataFrame with rows containing NaN values removed.
Fill missing values
- Connect DataFrame.
- Set Method to
fillna. - Provide a numeric or string value in Value (e.g.,
0). - Output: DataFrame with NaNs replaced.
Group by a column
- Connect DataFrame.
- Set Method to
groupby. - Provide column name (e.g.,
"landuse") in Column. - Output: Grouped result (aggregation behavior depends on implementation).
Generate descriptive statistics
- Connect DataFrame.
- Set Method to
describe. - Output: Summary statistics including count, mean, std, min, max, etc.

Notes
- Some methods require specific inputs:
fillnarequires Valuegroupbyrequires Column
- GroupBy behavior may require additional aggregation downstream depending on your workflow.
- Non-numeric columns are ignored by statistical methods such as
describe(). - Output is wrapped according to Sverchok data conventions. ```