![GitHub](https://img.shields.io/github/license/6chaoran/jupyter-summarytools)
![PyPI](https://img.shields.io/pypi/v/summarytools?color=blue) ![PyPI - Status](https://img.shields.io/pypi/status/summarytools?color=blue) ![PyPI - Downloads](https://img.shields.io/pypi/dm/summarytools?color=blue) ![GitHub last commit](https://img.shields.io/github/last-commit/6chaoran/jupyter-summarytools?color=blue)
# 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).
* Only `dfSummary` function is made available for now
* Added two html widgets to avoid displaying lengthy content
+ [collapsible summary](#collapsible-summary)
+ [tabbed summary](#tabbed-summary)
# Installation
```
pip install summarytools
```
## Dependencies
1. python 3.6+
2. pandas >= 1.4.0
# Quick Start
the quick-start notebook is available in [here](https://github.com/6chaoran/jupyter-summarytools/blob/master/quick-start.ipynb)
out-of-box `dfSummary` function will generate a HTML based data frame summary.
```py
import pandas as pd
from summarytools import dfSummary
titanic = pd.read_csv('./data/titanic.csv')
dfSummary(titanic)
```
![](images/dfSummary.png)
## collapsible summary
```py
import pandas as pd
from summarytools import dfSummary
titanic = pd.read_csv('./data/titanic.csv')
dfSummary(titanic, is_collapsible = True)
```
![](images/collapsible.gif)
## tabbed summary
```py
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()})
```
![](images/tabbed.gif)
# Export notebook as HTML
when export jupyter notebook to HTML, make sure `Export Embedded HTML
` extension is installed and enabled.
![](images/embedded_html.png)
Using the following bash command to retain the data frame summary in exported HTML.
```bash
jupyter nbconvert --to html_embed path/of/your/notebook.ipynb
```
Raw data
{
"_id": null,
"home_page": "https://github.com/6chaoran/jupyter-summarytools",
"name": "summarytools",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "sample, setuptools, development",
"author": "Liu Chaoran",
"author_email": "6chaoran@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/be/62/fb3c5356bdbd25f2e78ec12591900f461c49f3092fe2a6283aee08cabd69/summarytools-0.3.0.tar.gz",
"platform": null,
"description": "![GitHub](https://img.shields.io/github/license/6chaoran/jupyter-summarytools) \n\n![PyPI](https://img.shields.io/pypi/v/summarytools?color=blue) ![PyPI - Status](https://img.shields.io/pypi/status/summarytools?color=blue) ![PyPI - Downloads](https://img.shields.io/pypi/dm/summarytools?color=blue) ![GitHub last commit](https://img.shields.io/github/last-commit/6chaoran/jupyter-summarytools?color=blue)\n\n# DataFrame Summary Tools in Jupyter Notebook\n\nThis is python version of `summarytools`, which is used to generate standardized and comprehensive summary of dataframe in Jupyter Notebooks.\n\nThe idea is originated from the `summarytools` R package (https://github.com/dcomtois/summarytools).\n\n* Only `dfSummary` function is made available for now\n* Added two html widgets to avoid displaying lengthy content\n + [collapsible summary](#collapsible-summary) \n + [tabbed summary](#tabbed-summary)\n\n# Installation\n\n```\npip install summarytools\n```\n\n## Dependencies\n1. python 3.6+\n2. pandas >= 1.4.0\n\n# Quick Start\n\nthe quick-start notebook is available in [here](https://github.com/6chaoran/jupyter-summarytools/blob/master/quick-start.ipynb)\n\nout-of-box `dfSummary` function will generate a HTML based data frame summary.\n\n```py\nimport pandas as pd\nfrom summarytools import dfSummary\ntitanic = pd.read_csv('./data/titanic.csv')\ndfSummary(titanic)\n```\n![](images/dfSummary.png)\n\n## collapsible summary\n\n```py\nimport pandas as pd\nfrom summarytools import dfSummary\ntitanic = pd.read_csv('./data/titanic.csv')\ndfSummary(titanic, is_collapsible = True)\n```\n\n![](images/collapsible.gif)\n\n## tabbed summary\n\n```py\nimport pandas as pd\nfrom summarytools import dfSummary, tabset\ntitanic = pd.read_csv('./data/titanic.csv')\nvaccine = pd.read_csv('./data/country_vaccinations.csv')\nvaccine['date'] = pd.to_datetime(vaccine['date'])\n\ntabset({\n 'titanic': dfSummary(titanic).render(),\n 'vaccine': dfSummary(vaccine).render()})\n```\n\n![](images/tabbed.gif)\n\n# Export notebook as HTML\n\nwhen export jupyter notebook to HTML, make sure `Export Embedded HTML\n` extension is installed and enabled.\n\n![](images/embedded_html.png)\n\nUsing the following bash command to retain the data frame summary in exported HTML.\n```bash\njupyter nbconvert --to html_embed path/of/your/notebook.ipynb\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "summarytools in jupyter notebook",
"version": "0.3.0",
"project_urls": {
"Bug Reports": "https://github.com/6chaoran/jupyter-summarytools/issues",
"Homepage": "https://github.com/6chaoran/jupyter-summarytools"
},
"split_keywords": [
"sample",
" setuptools",
" development"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a52c6bd836c8ed95fbfe92760a9f0e316127a05ef7a1debd281a5f09dc34cc5a",
"md5": "194b5e760f5bf1c887e31113750075f6",
"sha256": "c05e9f143f8ec7fdba1fa03a20fee807543b846ae715a13f5d63a5e957349516"
},
"downloads": -1,
"filename": "summarytools-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "194b5e760f5bf1c887e31113750075f6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 12779,
"upload_time": "2024-05-13T23:21:35",
"upload_time_iso_8601": "2024-05-13T23:21:35.953071Z",
"url": "https://files.pythonhosted.org/packages/a5/2c/6bd836c8ed95fbfe92760a9f0e316127a05ef7a1debd281a5f09dc34cc5a/summarytools-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "be62fb3c5356bdbd25f2e78ec12591900f461c49f3092fe2a6283aee08cabd69",
"md5": "4de7f381ab27c04ff1adac17a540abfa",
"sha256": "9b6f6e83e2590b81e0308568a68bc0fddc91e3467521c0033a20d62a0f66cdd7"
},
"downloads": -1,
"filename": "summarytools-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "4de7f381ab27c04ff1adac17a540abfa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 15536,
"upload_time": "2024-05-13T23:21:37",
"upload_time_iso_8601": "2024-05-13T23:21:37.964927Z",
"url": "https://files.pythonhosted.org/packages/be/62/fb3c5356bdbd25f2e78ec12591900f461c49f3092fe2a6283aee08cabd69/summarytools-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-13 23:21:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "6chaoran",
"github_project": "jupyter-summarytools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "summarytools"
}