Skip to main content

summarytools in jupyter notebook

Project description

DataFrame Summary Tools in Jupyter Notebook

This is python version of summarytools, which is used to generate standardized and comprehensive summary of dataframe in Jupyter Notebooks.

The idea is originated from the summarytools R package (https://github.com/dcomtois/summarytools).

Installation

pip install jupyter-summarytools

Dependencies

  1. python 3.6+
  2. pandas >= 1.4.0

Quick Start

the quick-start notebook is available in here

out-of-box dfSummary function will generate a HTML based data frame summary.

import pandas as pd
from summarytools import dfSummary
titanic = pd.read_csv('./data/titanic.csv')
dfSummary(titanic)

collapsible summary

import pandas as pd
from summarytools import dfSummary
titanic = pd.read_csv('./data/titanic.csv')
dfSummary(titanic, is_collapsible = True)

tabbed summary

import pandas as pd
from summarytools import dfSummary, tabset
titanic = pd.read_csv('./data/titanic.csv')
vaccine = pd.read_csv('./data/country_vaccinations.csv')
vaccine['date'] = pd.to_datetime(vaccine['date'])

tabset({
    'titanic': dfSummary(titanic).render(),
    'vaccine': dfSummary(vaccine).render()})

Export notebook as HTML

when export jupyter notebook to HTML, make sure Export Embedded HTML extension is installed and enabled.

Using the following bash command to retain the data frame summary in exported HTML.

jupyter nbconvert --to html_embed path/of/your/notebook.ipynb

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter-summarytools-0.2.1.tar.gz (10.3 kB view details)

Uploaded Source

File details

Details for the file jupyter-summarytools-0.2.1.tar.gz.

File metadata

  • Download URL: jupyter-summarytools-0.2.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for jupyter-summarytools-0.2.1.tar.gz
Algorithm Hash digest
SHA256 eb738a547d274cbbb5ae4e51dc387c44e797cb5cc4f95960fa57a4c8b6fa3c83
MD5 3ec90fd3687ac77955de3e34b0e9ea2c
BLAKE2b-256 960a460343adc5b5c45bec6ec53d96dfdfd77bf5c23d1381e16405d52a549ea6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page