.. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here <sphx_glr_download_auto_examples_bivariate_summaries_plot_bivariate_numeric_categorical_summary.py>` to download the full example code
.. rst-class:: sphx-glr-example-title
Example of bivariate eda summary for a numeric independent variable and a categorical dependent variable.
The summary computes the following:
- Lineplot with fractions for each level of the categorical variable against quantiles of the numeric variable
import pandas as pd
import plotly
import intedact
Here we look at how diamond cut quality changes with carats.
data = pd.read_csv(
"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/diamonds.csv"
)
fig = intedact.numeric_categorical_summary(
data, "carat", "cut", num_intervals=5, fig_width=700
)
plotly.io.show(fig)
.. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.692 seconds)
.. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_bivariate_numeric_categorical_summary.py <plot_bivariate_numeric_categorical_summary.py>` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_bivariate_numeric_categorical_summary.ipynb <plot_bivariate_numeric_categorical_summary.ipynb>`
.. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_