missing_summary
missing_summary
Functions
| Name | Description |
|---|---|
| missing_summary | Generate a summary of missing values in a dataset. |
missing_summary
missing_summary.missing_summary(data)Generate a summary of missing values in a dataset.
This function computes, for each column in a pandas DataFrame, the total number of missing values and the proportion of missing values relative to the number of rows.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| data | pandas.DataFrame | Input dataset to be analyzed. | required |
Returns
| Name | Type | Description |
|---|---|---|
| pandas.DataFrame | A summary table indexed by column name with: - missing_count (int): number of missing values per column - missing_pct (float): proportion of missing values per column |
Raises
| Name | Type | Description |
|---|---|---|
| ValueError | If data is None or an empty DataFrame. |
|
| TypeError | If data is not a pandas DataFrame. |
Examples
>>> import pandas as pd
>>> from ez_df_data_validator.missing_summary import missing_summary
>>> df = pd.DataFrame({"a": [1, None, 3], "b": [None, None, "x"]})
>>> missing_summary(df)
missing_count missing_pct
column
a 1 0.333333
b 2 0.666667