Package: skimpy
SkimpyA light weight tool for creating summary statistics from dataframes.skimpyis a light weight tool that provides summary statistics about variables inpandasorPolarsdata frames within the console or your interactive Python window.Think of it as a super-charged version ofpandas'df.describe().You can find the documentation here.Quickstartskimapandasdataframe and produce summary statistics within the console
using:fromskimpyimportskimskim(df)wheredfis a dataframe. Alternatively, useskim_polars()onPolarsdataframes.If you need to a dataset to tryskimpyout on, you can use the built-in testPandasdata frame:fromskimpyimportskim,generate_test_datadf=generate_test_data()skim(df)╭──────────────────────────────────────────────── skimpy summary ─────────────────────────────────────────────────╮
│Data SummaryData TypesCategories│
│ ┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓ ┏━━━━━━━━━━━━━┳━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━━━━━┓                                │
│ ┃dataframe┃Values┃ ┃Column Type┃Count┃ ┃Categorical Variables┃                                │
│ ┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩ ┡━━━━━━━━━━━━━╇━━━━━━━┩ ┡━━━━━━━━━━━━━━━━━━━━━━━┩                                │
│ │ Number of rows    │ 1000   │ │ float64     │ 3     │ │ class                 │                                │
│ │ Number of columns │ 13     │ │ category    │ 2     │ │ location              │                                │
│ └───────────────────┴────────┘ │ datetime64  │ 2     │ └───────────────────────┘                                │
│                                │ object      │ 2     │                                                          │
│                                │ int64       │ 1     │                                                          │
│                                │ bool        │ 1     │                                                          │
│                                │ string      │ 1     │                                                          │
│                                │ timedelta64 │ 1     │                                                          │
│                                └─────────────┴───────┘                                                          │
│number│
│ ┏━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━┓  │
│ ┃column_name┃NA┃NA %┃mean┃sd┃p0┃p25┃p50┃p75┃p100┃hist┃  │
│ ┡━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━┩  │
│ │length│0│0│0.5│0.36│1.6e-06│0.13│0.5│0.86│1│▇▃▃▃▅▇│  │
│ │width│0│0│2│1.9│0.0021│0.6│1.5│3│14│▇▃▁│  │
│ │depth│0│0│10│3.2│2│8│10│12│20│▁▃▇▆▃▁│  │
│ │rnd│118│11.8│-0.02│1│-2.8│-0.74│-0.00077│0.66│3.7│▁▅▇▅▁│  │
│ └────────────────┴──────┴────────┴─────────┴───────┴───────────┴────────┴───────────┴───────┴───────┴────────┘  │
│category│
│ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓  │
│ ┃column_name┃NA┃NA %┃ordered┃unique┃  │
│ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩  │
│ │class│0│0│False│2│  │
│ │location│1│0.1│False│5│  │
│ └──────────────────────────────────┴───────────┴────────────────┴───────────────────────┴────────────────────┘  │
│bool│
│ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓  │
│ ┃column_name┃true┃true rate┃hist┃  │
│ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩  │
│ │booly_col│516│0.52│▇    ▇│  │
│ └────────────────────────────────────┴─────────────────┴───────────────────────────────┴─────────────────────┘  │
│datetime│
│ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓  │
│ ┃column_name┃NA┃NA %┃first┃last┃frequency┃  │
│ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩  │
│ │datetime│0│0│2018-01-31│2101-04-30│M│  │
│ │datetime_no_freq│3│0.3│1992-01-05│2023-03-04│None│  │
│ └──────────────────────────────┴───────┴──────────┴────────────────────┴───────────────────┴─────────────────┘  │
│<class 'datetime.date'>│
│ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓  │
│ ┃column_name┃NA┃NA %┃first┃last┃frequency┃  │
│ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩  │
│ │datetime.date│0│0│2018-01-31│2101-04-30│M│  │
│ │datetime.date_no_freq│0│0│1992-01-05│2023-03-04│None│  │
│ └──────────────────────────────────┴───────┴──────────┴──────────────────┴──────────────────┴────────────────┘  │
│timedelta64│
│ ┏━━━━━━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓  │
│ ┃column_name┃NA┃NA %┃mean┃median┃max┃  │
│ ┡━━━━━━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩  │
│ │time diff│5│0.5│8 days 00:05:47│0 days 00:00:00│26 days 00:00:00│  │
│ └──────────────────┴──────┴─────────┴───────────────────────┴───────────────────────┴────────────────────────┘  │
│string│
│ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓  │
│ ┃column_name┃NA┃NA %┃words per row┃total words┃  │
│ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━┩  │
│ │text│6│0.6│5.8│5761│  │
│ └───────────────────────────┴─────────┴────────────┴──────────────────────────────┴──────────────────────────┘  │
╰────────────────────────────────────────────────────── End ──────────────────────────────────────────────────────╯It is recommended that you set your datatypes before usingskimpy(for example converting any text columns to pandas string datatype), as this will produce richer statistical summaries. However, theskim()function will try and guess what the datatypes of your columns are.RequirementsYou can find a full list of requirements in thepyproject.tomlfile.You can try this package out right now in your browser using thisGoogle Colab notebook(requires a Google account). Note that the Google Colab notebook uses the latest package released on PyPI (rather than the development release).InstallationYou can install the latest release ofskimpyviapipfromPyPI:$pipinstallskimpyTo install the development version from git, use:$pipinstallgit+https://github.com/aeturrell/skimpy.gitFor development, seecontributing.LicenseDistributed under the terms of theMIT license,skimpyis free and open source software.IssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.skimpywas inspired by the R packageskimrand by exploratory Python packages includingydata_profilinganddataprep, from which theclean_columnsfunction comes.This package would not have been possible without theRichpackage.The package is built withpoetry, while the documentation is built withQuartoandQuartodoc(a Python package). Tests are run withnox.Usingskimpyin your paper? Let us know by raising an issue beginning with "citation" and we'll add it to this page.