A package to make pandas DataFrames display beautifully in Jupyter notebooks
Project description
Pandas Pretty Display
A simple Python package to make your pandas DataFrames look beautiful in Jupyter notebooks with alternating colors and improved formatting. Now with support for styled markdown headers!
Installation
You can install the package via pip:
pip install pandas-pretty-display
Usage
DataFrame Styling
from pandas_pretty_display import style_dataframe
import pandas as pd
# Create or load your DataFrame
df = pd.DataFrame(...)
# Apply the styling
style_dataframe()
# Display your DataFrame - it will now have the pretty styling
display(df)
Markdown Header Styling
from pandas_pretty_display import style_notebook
# Apply all styling at once (DataFrame + header styling)
style_notebook()
# Now you can use regular markdown headers in markdown cells:
# # Level 1 Header
# ## Level 2 Header
# ### Level 3 Header
All markdown headers in your notebook will automatically be styled with red borders, gold backgrounds, and dark blue text.
Individual Styling Functions
You can also apply just the header styling without the DataFrame styling:
from pandas_pretty_display import style_headers
# Apply only header styling
style_headers()
For backward compatibility, the package still includes functions to create headers directly in code cells:
from pandas_pretty_display import header1, header2, header3
# Create headers in code cells
header1("This is a Level 1 Header")
header2("This is a Level 2 Header")
header3("This is a Level 3 Header")
Features
DataFrame Styling
- Alternating gold and light blue row colors
- Black text in table cells
- Red text in table headers
- Black borders around cells
- 18px font size
- Full-width container
- Scrollable output up to 1000px height
Header Styling
- Level 1, 2, and 3 headers with consistent styling
- Red border (thickness varies by level)
- Gold background (#ffcc00)
- Dark blue text (#000080)
- Responsive sizing based on header level
- Rounded corners for modern appearance
Requirements
- Python >= 3.6
- pandas >= 1.0.0
- IPython >= 7.0.0
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pandas_pretty_display-0.3.5.tar.gz.
File metadata
- Download URL: pandas_pretty_display-0.3.5.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7560c2b4c58c09e9b301ab7a131fa20316d3dc9533fe5eaf457f08c467dfac86
|
|
| MD5 |
a8572ff93902b2e5273bef669b21a068
|
|
| BLAKE2b-256 |
42d5a54e16c5443090d8636e18f1748dea3b380b59819784288f65ed226ce3df
|
File details
Details for the file pandas_pretty_display-0.3.5-py3-none-any.whl.
File metadata
- Download URL: pandas_pretty_display-0.3.5-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06b606f1e45ef4c711655ba5aabfb405f182272b6b5ef4685ce704d308b01ff2
|
|
| MD5 |
f69c407355ae91e0d3400e8fd1c8d63e
|
|
| BLAKE2b-256 |
0a3f8a9d17fb7dec2fa000b4cec88c528a2c7608aeba29897815a1e37c10904f
|