cythondfprint


Namecythondfprint JSON
Version 0.12 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/cythondfprint
SummarySimple color printer for pandas DataFrames
upload_time2024-09-13 06:18:40
maintainerNone
docs_urlNone
authorJohannes Fischer
requires_pythonNone
licenseMIT
keywords pandas color printer
VCS
bugtrack_url
requirements Cython numpy pandas setuptools
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Simple color printer for pandas DataFrames

## pip install cythondfprint

### Tested against Windows 10 / Python 3.11 / Anaconda 

### Important!

The module will be compiled when you import it for the first time. Cython and a C/C++ compiler must be installed!

```python
import pandas as pd
from cythondfprint import add_printer

add_printer(1)  # overwrites __str__ and __repr__
df = pd.read_csv(
    "https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv"
)
print(df)
df.ds_color_print_all()
df.ds_color_print_all(
    column_rep=70,  # repeat columns after 70 rows
    max_colwidth=300,  # max column width (0 = no limit)
    ljust_space=2,
    sep=" | ",
    vtm_escape=True,  # to look pretty here: https://github.com/directvt/vtm
)
pd.color_printer_reset()  # to restore default
print(df)
pd.color_printer_activate()  # to print in color
print(df)
print(df.Name) # Series
df.Name.ds_color_print_all()  # Series
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/cythondfprint",
    "name": "cythondfprint",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "pandas, color, printer",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5b/cc/fcd48f542a7305269c8b17d0f26bd85d39de9a1d812b95c4ccf3bfbf77c2/cythondfprint-0.12.tar.gz",
    "platform": null,
    "description": "\r\n# Simple color printer for pandas DataFrames\r\n\r\n## pip install cythondfprint\r\n\r\n### Tested against Windows 10 / Python 3.11 / Anaconda \r\n\r\n### Important!\r\n\r\nThe module will be compiled when you import it for the first time. Cython and a C/C++ compiler must be installed!\r\n\r\n```python\r\nimport pandas as pd\r\nfrom cythondfprint import add_printer\r\n\r\nadd_printer(1)  # overwrites __str__ and __repr__\r\ndf = pd.read_csv(\r\n    \"https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv\"\r\n)\r\nprint(df)\r\ndf.ds_color_print_all()\r\ndf.ds_color_print_all(\r\n    column_rep=70,  # repeat columns after 70 rows\r\n    max_colwidth=300,  # max column width (0 = no limit)\r\n    ljust_space=2,\r\n    sep=\" | \",\r\n    vtm_escape=True,  # to look pretty here: https://github.com/directvt/vtm\r\n)\r\npd.color_printer_reset()  # to restore default\r\nprint(df)\r\npd.color_printer_activate()  # to print in color\r\nprint(df)\r\nprint(df.Name) # Series\r\ndf.Name.ds_color_print_all()  # Series\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple color printer for pandas DataFrames",
    "version": "0.12",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/cythondfprint"
    },
    "split_keywords": [
        "pandas",
        " color",
        " printer"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f16da4d8c1efe5465c7b39db60fe692886e824534d4635c5b5937cce617e544",
                "md5": "e6ce578b87ca1f977e35f568ad61f87e",
                "sha256": "4547bf967c0c6fdfb7237db3d28d71a2de807020bd607d88d081d41f69389086"
            },
            "downloads": -1,
            "filename": "cythondfprint-0.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e6ce578b87ca1f977e35f568ad61f87e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 26021,
            "upload_time": "2024-09-13T06:18:39",
            "upload_time_iso_8601": "2024-09-13T06:18:39.024988Z",
            "url": "https://files.pythonhosted.org/packages/3f/16/da4d8c1efe5465c7b39db60fe692886e824534d4635c5b5937cce617e544/cythondfprint-0.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5bccfcd48f542a7305269c8b17d0f26bd85d39de9a1d812b95c4ccf3bfbf77c2",
                "md5": "9474095d1a4725fcd2100b83a7f972a7",
                "sha256": "87c4896d1784ec0367f2d4d509ab3c8876929062f12e0ae566b61432d7bd1d7c"
            },
            "downloads": -1,
            "filename": "cythondfprint-0.12.tar.gz",
            "has_sig": false,
            "md5_digest": "9474095d1a4725fcd2100b83a7f972a7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 24921,
            "upload_time": "2024-09-13T06:18:40",
            "upload_time_iso_8601": "2024-09-13T06:18:40.569552Z",
            "url": "https://files.pythonhosted.org/packages/5b/cc/fcd48f542a7305269c8b17d0f26bd85d39de9a1d812b95c4ccf3bfbf77c2/cythondfprint-0.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-13 06:18:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "cythondfprint",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "Cython",
            "specs": []
        },
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "pandas",
            "specs": []
        },
        {
            "name": "setuptools",
            "specs": []
        }
    ],
    "lcname": "cythondfprint"
}
        
Elapsed time: 0.33337s