# FrameDisplay: Enhanced DataFrame Display
<div align="center">
[](https://github.com/nsarang/framedisplay)
[](https://pypi.org/project/framedisplay/)
[](https://pypi.org/project/framedisplay/)

[](https://codecov.io/gh/nsarang/framedisplay)
<br/>
<img alt="DataFrame" src="https://raw.githubusercontent.com/nsarang/framedisplay/refs/heads/main/assets/dataframe.png" width="500px" style="max-width: 100%;">
<br/>
<br/>
</div>
FrameDisplay is a lightweight Python package for rendering Pandas DataFrames as interactive HTML tables within Jupyter Notebooks and JupyterLab. It improves the default DataFrame display by adding features such as resizable columns, client-side sorting, sticky headers and index for improved navigation, data type indicators in column headers, distinct styling for null values, and tooltips for viewing complete cell content.
I work extensively with Pandas in my personal projects and have always wanted something similar to Databricks' display function, but for Jupyter. The existing open-source alternatives were either too heavyweight, lacked the visual appeal or didn't check all the boxes I needed. So I built this package to bridge that gap. It's not perfect yet, but I like it more than the alternatives :)
Live demo: [CodePen](https://codepen.io/B-L-A-Z-E/pen/empJPKV)
## Features
- **Resizable Columns**: Drag column dividers to resize them.
- **Sortable Columns**: Click on column headers to sort the data.
- **Sticky Header & Index**: The header and index rows remain visible during vertical and horizontal scrolling.
- **Column Type Icons**: Icons in headers indicate data types (numeric, string, etc.).
- **Null Value Styling**: `null` values are visually distinct.
- **Tooltips**: Hover over cell content to see the full value.
- **No Size Limit**: Display DataFrames of any size (be mindful of browser performance with very large tables).
**Roadmap**
- Virtual scrolling for improved performance with very large DataFrames.
- Additional customization options (e.g., theming).
## Installation
```bash
pip install framedisplay
```
## Usage
To display a DataFrame, simply import `framedisplay` and use the `frame_display` function:
```python
import pandas as pd
import numpy as np
import framedisplay as fd
df = pd.DataFrame({
'Name': ['Alice', 'Bob', np.nan],
'Age': [25, np.nan, 35],
'Score': [95.5, 87.2, np.nan]
})
fd.frame_display(df)
```
You can also enable FrameDisplay globally for all DataFrames in Jupyter by calling `fd.integrate_with_pandas()`:
```python
import pandas as pd
import framedisplay as fd
# Enable FrameDisplay for all DataFrames
fd.integrate_with_pandas()
# This will now display using FrameDisplay
df
```
## How it Works
FrameDisplay renders your Pandas DataFrame into an HTML table and injects custom CSS and JavaScript to enable interactive features directly in your Jupyter Notebook or browser.
## Configuration (Optional)
You can customize the behavior and appearance by setting a global `window.FrameDisplayConfig` object in a Jupyter cell before displaying:
```python
from IPython.display import display, HTML
display(HTML("""
<script>
window.FrameDisplayConfig = {
minColumnWidth: 30,
resizerWidth: 8,
resizerHoverColor: 'rgba(0,0,0,0.1)',
showHoverEffect: true,
autoInit: true,
allowReInit: true
};
</script>
"""))
```
## Offline Mode
If you are working in an environment without internet access, you can inject the necessary JavaScript and CSS locally by calling `initialize()` at the start of your notebook. This bundles the required assets into the notebook itself.
```python
import framedisplay as fd
fd.initialize()
# Now you can use fd.frame_display(df) without needing an internet connection
```
## License
MIT
Raw data
{
"_id": null,
"home_page": "https://github.com/nsarang/framedisplay",
"name": "framedisplay",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "dataframe display pandas jupyter notebook",
"author": "Nima Sarang",
"author_email": "contact@nimasarang.com",
"download_url": "https://files.pythonhosted.org/packages/2d/03/a95c296a3dabf77f01b69efef4cd3d57c9289032aa9a7d5741c6a79719fc/framedisplay-1.1.5.tar.gz",
"platform": null,
"description": "# FrameDisplay: Enhanced DataFrame Display\n\n<div align=\"center\">\n\n[](https://github.com/nsarang/framedisplay)\n[](https://pypi.org/project/framedisplay/)\n[](https://pypi.org/project/framedisplay/)\n\n[](https://codecov.io/gh/nsarang/framedisplay)\n\n<br/>\n<img alt=\"DataFrame\" src=\"https://raw.githubusercontent.com/nsarang/framedisplay/refs/heads/main/assets/dataframe.png\" width=\"500px\" style=\"max-width: 100%;\">\n\n<br/>\n<br/>\n</div>\n\nFrameDisplay is a lightweight Python package for rendering Pandas DataFrames as interactive HTML tables within Jupyter Notebooks and JupyterLab. It improves the default DataFrame display by adding features such as resizable columns, client-side sorting, sticky headers and index for improved navigation, data type indicators in column headers, distinct styling for null values, and tooltips for viewing complete cell content.\n\nI work extensively with Pandas in my personal projects and have always wanted something similar to Databricks' display function, but for Jupyter. The existing open-source alternatives were either too heavyweight, lacked the visual appeal or didn't check all the boxes I needed. So I built this package to bridge that gap. It's not perfect yet, but I like it more than the alternatives :)\n\n\nLive demo: [CodePen](https://codepen.io/B-L-A-Z-E/pen/empJPKV)\n\n## Features\n\n- **Resizable Columns**: Drag column dividers to resize them.\n- **Sortable Columns**: Click on column headers to sort the data.\n- **Sticky Header & Index**: The header and index rows remain visible during vertical and horizontal scrolling.\n- **Column Type Icons**: Icons in headers indicate data types (numeric, string, etc.).\n- **Null Value Styling**: `null` values are visually distinct.\n- **Tooltips**: Hover over cell content to see the full value.\n- **No Size Limit**: Display DataFrames of any size (be mindful of browser performance with very large tables).\n\n**Roadmap**\n- Virtual scrolling for improved performance with very large DataFrames.\n- Additional customization options (e.g., theming).\n\n## Installation\n\n```bash\npip install framedisplay\n```\n\n## Usage\n\nTo display a DataFrame, simply import `framedisplay` and use the `frame_display` function:\n\n```python\nimport pandas as pd\nimport numpy as np\nimport framedisplay as fd\n\ndf = pd.DataFrame({\n 'Name': ['Alice', 'Bob', np.nan],\n 'Age': [25, np.nan, 35],\n 'Score': [95.5, 87.2, np.nan]\n})\n\nfd.frame_display(df)\n```\n\nYou can also enable FrameDisplay globally for all DataFrames in Jupyter by calling `fd.integrate_with_pandas()`:\n\n```python\nimport pandas as pd\nimport framedisplay as fd\n\n# Enable FrameDisplay for all DataFrames\nfd.integrate_with_pandas()\n\n# This will now display using FrameDisplay\ndf\n```\n\n## How it Works\n\nFrameDisplay renders your Pandas DataFrame into an HTML table and injects custom CSS and JavaScript to enable interactive features directly in your Jupyter Notebook or browser.\n\n## Configuration (Optional)\n\nYou can customize the behavior and appearance by setting a global `window.FrameDisplayConfig` object in a Jupyter cell before displaying:\n\n```python\nfrom IPython.display import display, HTML\n\ndisplay(HTML(\"\"\"\n<script>\nwindow.FrameDisplayConfig = {\n minColumnWidth: 30,\n resizerWidth: 8,\n resizerHoverColor: 'rgba(0,0,0,0.1)',\n showHoverEffect: true,\n autoInit: true,\n allowReInit: true\n};\n</script>\n\"\"\"))\n```\n\n## Offline Mode\n\nIf you are working in an environment without internet access, you can inject the necessary JavaScript and CSS locally by calling `initialize()` at the start of your notebook. This bundles the required assets into the notebook itself.\n\n```python\nimport framedisplay as fd\nfd.initialize()\n\n# Now you can use fd.frame_display(df) without needing an internet connection\n```\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": null,
"summary": "Enhanced DataFrame Display",
"version": "1.1.5",
"project_urls": {
"Documentation": "https://github.com/nsarang/framedisplay#readme",
"Homepage": "https://github.com/nsarang/framedisplay",
"Issues": "https://github.com/nsarang/framedisplay/issues"
},
"split_keywords": [
"dataframe",
"display",
"pandas",
"jupyter",
"notebook"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5bfcea4531078edb981c3afb7cfdd651dfafe02faa6fef73755d8be7a557a11a",
"md5": "ff65811928b8238f8aafa8149be67564",
"sha256": "ae87859f2168276647f4b0b8b46b0118e1f7a6a6fcd0c8ecc4b052a3f0a7d607"
},
"downloads": -1,
"filename": "framedisplay-1.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ff65811928b8238f8aafa8149be67564",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 32512,
"upload_time": "2025-08-14T20:30:15",
"upload_time_iso_8601": "2025-08-14T20:30:15.646375Z",
"url": "https://files.pythonhosted.org/packages/5b/fc/ea4531078edb981c3afb7cfdd651dfafe02faa6fef73755d8be7a557a11a/framedisplay-1.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2d03a95c296a3dabf77f01b69efef4cd3d57c9289032aa9a7d5741c6a79719fc",
"md5": "d366c6b587218c3360e2e0db3dc77f32",
"sha256": "b5aaaab0f53bfc17ba7531d05f15a819a4dfdbcde263f0a8479ec5c4f3f00f3c"
},
"downloads": -1,
"filename": "framedisplay-1.1.5.tar.gz",
"has_sig": false,
"md5_digest": "d366c6b587218c3360e2e0db3dc77f32",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 29890,
"upload_time": "2025-08-14T20:30:16",
"upload_time_iso_8601": "2025-08-14T20:30:16.806861Z",
"url": "https://files.pythonhosted.org/packages/2d/03/a95c296a3dabf77f01b69efef4cd3d57c9289032aa9a7d5741c6a79719fc/framedisplay-1.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-14 20:30:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nsarang",
"github_project": "framedisplay",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "framedisplay"
}