Skip to content

Commit

Permalink
docs(eda): added docs for create_diff_report
Browse files Browse the repository at this point in the history
  • Loading branch information
Devin Lu authored and jinglinpeng committed Nov 25, 2021
1 parent e23e3a7 commit d8fc9d4
Showing 1 changed file with 107 additions and 0 deletions.
107 changes: 107 additions & 0 deletions docs/source/user_guide/eda/create_diff_report.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "suitable-monster",
"metadata": {},
"source": [
"# create_diff_report(): generate statistical report for multiple dataframes"
]
},
{
"cell_type": "markdown",
"id": "corresponding-slide",
"metadata": {},
"source": [
"## Overview"
]
},
{
"cell_type": "markdown",
"id": "empirical-browser",
"metadata": {},
"source": [
"The function create_diff_report() allows users to generate a statistical report similar to the create_report() function.\n",
"\n",
"The function accepts either a list of Pandas dataframes, or a dictionary of Pandas dataframes with string keys as labels. Let's take a look."
]
},
{
"cell_type": "markdown",
"id": "detailed-patch",
"metadata": {},
"source": [
"## Loading the dataset"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "gentle-indian",
"metadata": {},
"outputs": [],
"source": [
"from dataprep.datasets import load_dataset\n",
"df_train, df_test = load_dataset('house_prices_train'), load_dataset('house_prices_test')"
]
},
{
"cell_type": "markdown",
"id": "proprietary-sensitivity",
"metadata": {},
"source": [
"## Generate the report"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "hindu-jaguar",
"metadata": {},
"outputs": [],
"source": [
"from dataprep.eda import create_diff_report\n",
"report = create_diff_report([df_train, df_test])"
]
},
{
"cell_type": "markdown",
"id": "tough-server",
"metadata": {},
"source": [
"Or sometimes we want to give specific labels to our dataframes"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "absent-version",
"metadata": {},
"outputs": [],
"source": [
"report = create_diff_report({\"df_train\": df_train, \"df_test\": df_test})"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

0 comments on commit d8fc9d4

Please sign in to comment.