Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khuyentran1401/rich-dataframe
Create animated and pretty Pandas Dataframe
https://github.com/khuyentran1401/rich-dataframe
command-line pandas pandas-dataframe python rich-text
Last synced: 7 days ago
JSON representation
Create animated and pretty Pandas Dataframe
- Host: GitHub
- URL: https://github.com/khuyentran1401/rich-dataframe
- Owner: khuyentran1401
- License: apache-2.0
- Created: 2021-02-15T12:17:08.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-18T15:38:42.000Z (over 1 year ago)
- Last Synced: 2025-02-07T02:01:57.851Z (14 days ago)
- Topics: command-line, pandas, pandas-dataframe, python, rich-text
- Language: Python
- Homepage: https://pypi.org/project/rich-dataframe/
- Size: 335 KB
- Stars: 117
- Watchers: 6
- Forks: 26
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/ambv/black)
[](https://github.com/khuyentran1401/rich-dataframe/blob/master/LICENSE)# Rich DataFrame
Create animated and pretty Pandas Dataframe or Pandas Series, as shown below:

# Installation
```bash
pip install rich-dataframe
```
# Usage
## Minimal example
```python
from sklearn.datasets import fetch_openml
from rich_dataframe import prettifyspeed_dating = fetch_openml(name='SpeedDating', version=1)['frame']
table = prettify(speed_dating)
```If you want to pass a non-dataframe object, `rich_dataframe` got it covered too!
```python
from rich_dataframe import prettifyvar = {'a': 1, 'b': 3}
prettify(var)
```

## Parameters
* **df: pd.DataFrame**
The data you want to prettify
* **row_limit : int, optional**
Number of rows to show, by default `20`
* **col_limit : int, optional**
Number of columns to show, by default `10`
* **first_rows : bool, optional**
Whether to show first n rows or last n rows, by default `True`. If this is set to `False`, show last n rows.
* **first_cols : bool, optional**
Whether to show first n columns or last n columns, by default `True`. If this is set to `False`, show last n rows.
* **delay_time : int, optional**
How fast is the animation, by default `5`. Increase this to have slower animation.
* **clear_console: bool, optional**
Clear the console before printing the table, by default True. If this is set to false the previous console input/output is maintained