<jupyter_start><jupyter_text>`create_report()`: generate profile reports from a pandas DataFrame  Overview The goal of `create_report` is to generate profile reports from a pandas DataFrame. `create_report` utilizes the functionalities and formats the plots from `dataprep`. It provides the following information:1. Overview: detect the types of columns in a dataframe2. Variables: variable type, unique values, distint count, missing values3. Quantile statistics like minimum value, Q1, median, Q3, maximum, range, interquartile range4. Descriptive statistics like mean, mode, standard deviation, sum, median absolute deviation, coefficient of variation, kurtosis, skewness5. Text analysis for length, sample and letter6. Correlations: highlighting of highly correlated variables, Spearman, Pearson and Kendall matrices7. Missing Values: bar chart, heatmap and spectrum of missing valuesIn the following, we break down the report into different sections to demonstrate each part of the report.  Loading the dataset Here we load the `titanic` dataset into a pandas dataframe and use it to demonstrate our functionality:<jupyter_code>from dataprep.datasets import load_dataset
df = load_dataset("titanic")<jupyter_output><empty_output><jupyter_text>Generate report via `create_report(df)` After getting a dataset, we could generate the report object by calling `create_report(df)`. The following shows an example:<jupyter_code>from dataprep.eda import create_report
report = create_report(df, title='My Report')<jupyter_output><empty_output><jupyter_text>Once we have a report object, we can show it in the notebook, or open the report in browser:<jupyter_code># display(report)
report.show_browser()<jupyter_output><empty_output><jupyter_text>Or just save the report to local:<jupyter_code>report.save('report.html')<jupyter_output><empty_output><jupyter_text>You can see the full report [here](../../_static/images/create_report/titanic_dp.html)  Enable/Disable sections Computing all the sections is time consuming. You can enable/disable sections using the following two approaches. 1. Just show a few sections by setting display argument. E.g., run the following code to show only the overview section and the variables section:<jupyter_code>report = create_report(df, display=['Overview', 'Variables'])<jupyter_output><empty_output><jupyter_text>2. Just disable a few sections by setting enable to False. E.g., run the following code to disable interactions section:<jupyter_code>report = create_report(df, config={'interactions.enable': False})<jupyter_output><empty_output><jupyter_text>Overview section In this section, we can see the types of columns and the statistics of the dataset.<jupyter_code>create_report(df, display=['Overview'])<jupyter_output><empty_output><jupyter_text>Variables section In this section, we can see the statistics and plots for each of variable in the dataset.For numerical variable, the report shows quantile statistics, descriptive statistics, histogram, KDE plot, QQ norm plot and box plot.For categorical variable, the report shows text analysis, bar chart, pie chart, word cloud, word frequencies and word length.For datetime variable, the report shows line chart.Furthermore, the variables being displayed can also be sorted based on a number of criteria.<jupyter_code>create_report(df, display=['Variables'])<jupyter_output><empty_output><jupyter_text>Interactions section In this section, the report will show an interactive plot, user can use the dropdown menu above the plot to select which two variables user wants to compare. By default, it show the scatter plot for all numerical columns.<jupyter_code>create_report(df, display=['Interactions'])<jupyter_output><empty_output><jupyter_text>You can also enable categorical variables by setting `interactions.cat_enable` to True. It will add categorical-categorical and categorical-numerical interactions:  Correlations section In this section, we can see the correlations between variables in Spearman, Pearson and Kendall matrices.<jupyter_code>create_report(df, display=['Correlations'])<jupyter_output><empty_output><jupyter_text>Missing Values section In this section, we can see the missing values in the dataset through bar chart, spectrum and heatmap.<jupyter_code>create_report(df, display=['Missing Values'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07179015186378279, 'fraction_numerical': 0.0025310630464795212, 'mean_word_length': 7.125233644859813, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '280583', 'license': 'MIT', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1117, 'n_words': 474, 'path': 'docs/source/user_guide/eda/create_report.ipynb', 'repo_name': 'jwa345/dataprep', 'size': '4346'}