Skip to content

Commit

Permalink
update on missing value function in example doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhengHe-007 committed Jan 25, 2025
1 parent 0a53a4a commit cf1cca9
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions docs/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,35 @@
"source": [
"## Check if data file has any missing values\n",
"\n",
"After verifying the data file type, the next step is to check whether the data contains any missing values using `missing_values_summary`."
"After verifying the data file type, the next step is to check whether the data contains any missing values using `missing_values_summary`.\n",
"\n",
"This function will quickly provide a summary including: \n",
" • The count of missing values for each column. \n",
" • The percentage of missing values for each column."
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 7,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"text/plain": [
"Age 1 (25.0%)\n",
"City 1 (25.0%)\n",
"Name: Missing Count (Percentage), dtype: object"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sample_df = pd.read_csv(file_name)"
"sample_df = pd.read_csv(file_name)\n",
"\n",
"missing_values_summary(sample_df)"
]
},
{
Expand Down Expand Up @@ -207,6 +226,13 @@
"get_summary_statistics(sample_df)\n",
"get_summary_statistics(sample_df, col=[\"Age\", \"City\"])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -225,7 +251,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.8"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down

0 comments on commit cf1cca9

Please sign in to comment.