a-pandas-ex-html-view


Namea-pandas-ex-html-view JSON
Version 0.11 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/a_pandas_ex_html_view
SummaryView/save any Pandas DataFrame/Series as HTML, works with MultiIndex as well
upload_time2023-05-13 10:29:41
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords json dict list html css
VCS
bugtrack_url
requirements a_pandas_ex_plode_tool pandas regex
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ### DataFrame / Series in your browser

```python
#Based on pypi.org/project/any-iter-to-html-table/
from a_pandas_ex_html_view import pd_add_html_view
import pandas as pd
pd_add_html_view() #this adds to new methods to pandas
df = pd.read_csv("https://github.com/pandas-dev/pandas/raw/main/doc/data/titanic.csv")
df.ds_html_view() #for whole DataFrame
df.Name.ds_html_view() #for Series
```

![](https://github.com/hansalemaos/screenshots/raw/main/screenshotpandastable.png)

![](https://github.com/hansalemaos/screenshots/raw/main/screenshotpandasseries.png)

### For DataFrames with MultiIndex

If you create your MultiIndexed DataFrame using [a-pandas-ex-plode-tool · PyPI](https://pypi.org/project/a-pandas-ex-plode-tool/)

a_pandas_ex_html_view will format the DataFrame in the prettiest way possible :)

![](https://github.com/hansalemaos/screenshots/raw/main/pandsnesteddicthtml.png)

```python
from a_pandas_ex_plode_tool import pd_add_explode_tools
pd_add_explode_tools()
data = {
    "glossary": {
        "title": "example glossary",
        "GlossDiv": {
            "title": "S",
            "GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
                    "SortAs": "SGML",
                    "GlossTerm": "Standard Generalized Markup Language",
                    "Acronym": "SGML",
                    "Abbrev": "ISO 8879:1986",
                    "GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
                        "GlossSeeAlso": ["GML", "XML"],
                    },
                    "GlossSee": "markup",
                }
            },
        },
    }
}
df = pd.Q_AnyNestedIterable_2df(data)
df.ds_html_view()   
#if you don't want to open it in browser, just save it to your HDD:
df.ds_html_view('f:\\testhtml.html') 
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/a_pandas_ex_html_view",
    "name": "a-pandas-ex-html-view",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "json,dict,list,HTML,CSS",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/56/91/9f67638f8de594a6c4f671450884df0fcf7c92b9fd3bcd94a4efec4d3d66/a_pandas_ex_html_view-0.11.tar.gz",
    "platform": null,
    "description": "### DataFrame / Series in your browser\r\n\r\n```python\r\n#Based on pypi.org/project/any-iter-to-html-table/\r\nfrom a_pandas_ex_html_view import pd_add_html_view\r\nimport pandas as pd\r\npd_add_html_view() #this adds to new methods to pandas\r\ndf = pd.read_csv(\"https://github.com/pandas-dev/pandas/raw/main/doc/data/titanic.csv\")\r\ndf.ds_html_view() #for whole DataFrame\r\ndf.Name.ds_html_view() #for Series\r\n```\r\n\r\n![](https://github.com/hansalemaos/screenshots/raw/main/screenshotpandastable.png)\r\n\r\n![](https://github.com/hansalemaos/screenshots/raw/main/screenshotpandasseries.png)\r\n\r\n### For DataFrames with MultiIndex\r\n\r\nIf you create your MultiIndexed DataFrame using [a-pandas-ex-plode-tool \u00c2\u00b7 PyPI](https://pypi.org/project/a-pandas-ex-plode-tool/)\r\n\r\na_pandas_ex_html_view will format the DataFrame in the prettiest way possible :)\r\n\r\n![](https://github.com/hansalemaos/screenshots/raw/main/pandsnesteddicthtml.png)\r\n\r\n```python\r\nfrom a_pandas_ex_plode_tool import pd_add_explode_tools\r\npd_add_explode_tools()\r\ndata = {\r\n    \"glossary\": {\r\n        \"title\": \"example glossary\",\r\n        \"GlossDiv\": {\r\n            \"title\": \"S\",\r\n            \"GlossList\": {\r\n                \"GlossEntry\": {\r\n                    \"ID\": \"SGML\",\r\n                    \"SortAs\": \"SGML\",\r\n                    \"GlossTerm\": \"Standard Generalized Markup Language\",\r\n                    \"Acronym\": \"SGML\",\r\n                    \"Abbrev\": \"ISO 8879:1986\",\r\n                    \"GlossDef\": {\r\n                        \"para\": \"A meta-markup language, used to create markup languages such as DocBook.\",\r\n                        \"GlossSeeAlso\": [\"GML\", \"XML\"],\r\n                    },\r\n                    \"GlossSee\": \"markup\",\r\n                }\r\n            },\r\n        },\r\n    }\r\n}\r\ndf = pd.Q_AnyNestedIterable_2df(data)\r\ndf.ds_html_view()   \r\n#if you don't want to open it in browser, just save it to your HDD:\r\ndf.ds_html_view('f:\\\\testhtml.html') \r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "View/save any Pandas DataFrame/Series as HTML, works with MultiIndex as well",
    "version": "0.11",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/a_pandas_ex_html_view"
    },
    "split_keywords": [
        "json",
        "dict",
        "list",
        "html",
        "css"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e8a7d862a0e1ddc1d23088186535087f441b577cf0f31b2ecadabf1703fd1d8",
                "md5": "2694fe9dc92cfc8628bba4585c65f724",
                "sha256": "c72c8ad64798a97cdf97e696446e893f65f46ac1f443b5ff2b9ce5d8733e89b2"
            },
            "downloads": -1,
            "filename": "a_pandas_ex_html_view-0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2694fe9dc92cfc8628bba4585c65f724",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12983,
            "upload_time": "2023-05-13T10:29:39",
            "upload_time_iso_8601": "2023-05-13T10:29:39.446409Z",
            "url": "https://files.pythonhosted.org/packages/5e/8a/7d862a0e1ddc1d23088186535087f441b577cf0f31b2ecadabf1703fd1d8/a_pandas_ex_html_view-0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "56919f67638f8de594a6c4f671450884df0fcf7c92b9fd3bcd94a4efec4d3d66",
                "md5": "1868cc8d07ed8b5e5235b68d838c94b2",
                "sha256": "0c1adcbe75d4ddd1ed34ba70c38b5e78ac564be013b1cbabd6deb6eeed44d7e7"
            },
            "downloads": -1,
            "filename": "a_pandas_ex_html_view-0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "1868cc8d07ed8b5e5235b68d838c94b2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11418,
            "upload_time": "2023-05-13T10:29:41",
            "upload_time_iso_8601": "2023-05-13T10:29:41.463247Z",
            "url": "https://files.pythonhosted.org/packages/56/91/9f67638f8de594a6c4f671450884df0fcf7c92b9fd3bcd94a4efec4d3d66/a_pandas_ex_html_view-0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-13 10:29:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "a_pandas_ex_html_view",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "a_pandas_ex_plode_tool",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "regex",
            "specs": []
        }
    ],
    "lcname": "a-pandas-ex-html-view"
}
        
Elapsed time: 0.11643s