Skip to main content

pandas-tibble PyPI Version

Downloads

Display pandas DataFrames with R-style tibble formatting in the terminal.

What it does

  • Tibble class - a DataFrame subclass that preserves all pandas functionality with automatic tibble-style display
  • Prints DataFrames with column type annotations (<chr>, <int>, <dbl>, <date>, <datetime>)
  • Shows dimensions at the top
  • Distinguishes between date and datetime types
  • Provides glimpse() for quick column overview
  • All pandas operations work: .query(), .merge(), .groupby(), etc.

Installation

pip install pandas-tibble

For development:

git clone https://github.com/caspercrause/pandas-tibble.git
cd pandas-tibble
poetry install

Requirements

  • Python >= 3.10.0
  • pandas >= 2.0.0
  • rich >= 13.0.0

Usage

Tibble class (Recommended)

Create a DataFrame subclass with automatic beautiful display:

from pandas_tibble import Tibble

# Create a Tibble - displays automatically!
tbl = Tibble({
    'product': ['A', 'B', 'A', 'B'],
    'revenue': [100, 150, 120, 180],
    'units': [10, 12, 11, 15]
})

# Just evaluate it - beautiful display
tbl

# All pandas operations work and return Tibbles!
tbl.query('revenue > 110')
tbl['profit'] = tbl['revenue'] * 0.2
tbl.groupby('product').sum()
tbl.merge(other_tbl, on='product')

Output:

# A DataFrame: 4 × 3

product  revenue  units
<chr>    <int>    <int>
A        100      10
B        150      12
A        120      11
B        180      15

tibble() function (for printing purposes only)

Display any DataFrame with type annotations:

import pandas as pd
from pandas_tibble import tibble
from datetime import date

df = pd.DataFrame({
    'start_date': [date(2024, 1, i) for i in range(1, 6)],
    'name': ['Alice', 'Bob', 'Charlie', 'Diana', 'Eve'],
    'value': [100, 200, 300, 400, 500]
})

tibble(df)

Output:

# A DataFrame: 5 × 3

start_date  name     value
<date>      <chr>    <int>
━━━━━━━━━━━━━━━━━━━━━━━━━━━
2024-01-01  Alice    100
2024-01-02  Bob      200
2024-01-03  Charlie  300
2024-01-04  Diana    400
2024-01-05  Eve      500

Options:

tibble(df, max_rows=20)         # Show more rows
tibble(df, show_index=True)     # Include index column

glimpse()

Quick column overview:

glimpse(df)

Output:

Rows: 5
Columns: 3

start_date  <date>  2024-01-01, 2024-01-02, 2024-01-03...
name        <chr>   Alice, Bob, Charlie...
value       <int>   100, 200, 300...

Type mapping

pandas dtype Display Format
object (string) <chr> as-is
int64 <int> as-is
float64 <dbl> 2 decimals
bool <lgl> True/False
datetime64[ns] <datetime> YYYY-MM-DD HH:MM:SS
object (date) <date> YYYY-MM-DD
category <fctr> as-is
timedelta64[ns] <timedelta> as-is

Missing values display as NA.

Features

  • ✅ Full pandas compatibility - all methods preserved
  • ✅ Automatic beautiful display in terminal, Jupyter, VS Code
  • ✅ Operations return Tibble objects (.query(), .merge(), .groupby(), etc.)
  • ✅ Type annotations for all columns
  • ✅ Works with existing DataFrames via Tibble(df) conversion

What it doesn't do

  • Does not replicate R tibble's subsetting rules
  • Does not support tibble construction syntax (use dict or DataFrame syntax)
  • Does not modify how pandas operations work (100% compatible)

Similar Packages

Several packages provide enhanced DataFrame display or R-style functionality:

  • rich-dataframe: Creates animated and pretty DataFrames using Rich, but is display-only and does not create a DataFrame subclass
  • skimpy: Python port of R's skimr package, focuses on summary statistics rather than full tibble-style display
  • tabulate: General table formatting library used by pandas' to_markdown(), provides formatting without DataFrame integration
  • rich-tools: Helper functions to convert DataFrames to Rich tables for printing, not a DataFrame replacement
  • datar: Full tidyverse port to Python with complete API replacement and heavy dependencies

What Sets pandas-tibble Apart

pandas-tibble is the only package that combines all of the following:

  • DataFrame subclass that preserves all pandas methods and operations
  • Automatic R-style tibble display without explicit print calls
  • Lightweight implementation with only two dependencies (pandas and Rich)
  • All operations return Tibble objects, maintaining consistency throughout your workflow
  • Drop-in replacement for pandas DataFrames with zero API changes

Most packages are either display-only utilities or complete pandas replacements. pandas-tibble provides the best of both worlds: beautiful R-style display with full pandas compatibility.

License

MIT

Author

Casper Crause

Metadata

Release files for pandas-tibble 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pandas-tibble 0.2.3
File Size Uploaded Provenance
pandas_tibble-0.2.3.tar.gz 6.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pandas-tibble 0.2.3
File Interpreter ABI Platform
pandas_tibble-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / pandas_tibble-0.2.3.tar.gz

Download URL pandas_tibble-0.2.3.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
023eb753eb70ca56d3d5b0ecd36bb1bc985b1a27c8bb0ee273c05a28639daf3b
BLAKE2b-256 checksum
How to use checksums
4116443078da4516a287468c32fae32849044bf9226e680d4fa4d371e49ab8b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.0 Darwin/24.6.0

Release files / pandas_tibble-0.2.3-py3-none-any.whl

Download URL pandas_tibble-0.2.3-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12c4f37313ef2106fbef0d843f8d924cf3f3ab602ec6164f3d6683767292abd5
BLAKE2b-256 checksum
How to use checksums
70d3146fd6ee774a9928eb459317ce1ba6538d61e2464ea80cc10f1205306c63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.0 Darwin/24.6.0

Security for pandas-tibble 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page