.. _sphx_glr_auto_examples_exploration_ex_summarize.py:
=================
Example summarize
=================
Demonstrates how to use the ``summarize`` function to get a quick
summary of your dataset.
.. raw:: html
.. rst-class:: sphx-glr-script-out
Out::
sepal length (cm) ... x5
Mean 5.843333 ... NaN
Median 5.800000 ... NaN
Max 7.900000 ... NaN
Min 4.300000 ... NaN
Variance 0.685694 ... NaN
Skewness 0.311753 ... NaN
Kurtosis -0.573568 ... NaN
Least Freq. NaN ... Level1
Most Freq. NaN ... Level1
Class Balance NaN ... 1
Num Levels NaN ... 1
Arity NaN ... 0.00666667
Missing 0.000000 ... 0
[13 rows x 6 columns]
|
.. code-block:: python
print(__doc__)
# Author: Taylor Smith
from skoot.exploration import summarize
from skoot.datasets import load_iris_df
# #############################################################################
# load data
iris = load_iris_df(include_tgt=True)
# add a feature of nothing but a single level of strings. This is to
# demonstrate that the summary will report on even uninformative features
iris["x5"] = "Level1"
# print the summary of the dataset
print(summarize(iris))
**Total running time of the script:** ( 0 minutes 0.035 seconds)
.. only :: html
.. container:: sphx-glr-footer
.. container:: sphx-glr-download
:download:`Download Python source code: ex_summarize.py `
.. container:: sphx-glr-download
:download:`Download Jupyter notebook: ex_summarize.ipynb `
.. only:: html
.. rst-class:: sphx-glr-signature
`Gallery generated by Sphinx-Gallery `_