.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "packages/statistics/auto_examples/plot_pandas.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_packages_statistics_auto_examples_plot_pandas.py: Plotting simple quantities of a pandas dataframe ================================================= This example loads from a CSV file data with mixed numerical and categorical entries, and plots a few quantities, separately for females and males, thanks to the pandas integrated plotting tool (that uses matplotlib behind the scene). See http://pandas.pydata.org/pandas-docs/stable/visualization.html .. GENERATED FROM PYTHON SOURCE LINES 12-30 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /packages/statistics/auto_examples/images/sphx_glr_plot_pandas_001.png :alt: Female, Male :srcset: /packages/statistics/auto_examples/images/sphx_glr_plot_pandas_001.png :class: sphx-glr-multi-img * .. image-sg:: /packages/statistics/auto_examples/images/sphx_glr_plot_pandas_002.png :alt: plot pandas :srcset: /packages/statistics/auto_examples/images/sphx_glr_plot_pandas_002.png :class: sphx-glr-multi-img * .. image-sg:: /packages/statistics/auto_examples/images/sphx_glr_plot_pandas_003.png :alt: plot pandas :srcset: /packages/statistics/auto_examples/images/sphx_glr_plot_pandas_003.png :class: sphx-glr-multi-img .. code-block:: Python import pandas data = pandas.read_csv("brain_size.csv", sep=";", na_values=".") # Box plots of different columns for each gender groupby_gender = data.groupby("Gender") groupby_gender.boxplot(column=["FSIQ", "VIQ", "PIQ"]) from pandas import plotting # Scatter matrices for different columns plotting.scatter_matrix(data[["Weight", "Height", "MRI_Count"]]) plotting.scatter_matrix(data[["PIQ", "VIQ", "FSIQ"]]) import matplotlib.pyplot as plt plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.539 seconds) .. _sphx_glr_download_packages_statistics_auto_examples_plot_pandas.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_pandas.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_pandas.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_pandas.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_