Skip to content

Instantly share code, notes, and snippets.

@wassname
Last active Sep 22, 2021
Embed
What would you like to do?
show a pandas data frame in full
from IPython.display import display
import pandas as pd
def pdshow(df):
"""
This shows a pandas dataframe in full/
Also consider .to_html() and https://pbpython.com/dataframe-gui-overview.html
Usage:
pdshow(df.sample(10))
From: https://gist.github.com/wassname/cfb9a1780af119327440b832ae270c2c
See https://pandas.pydata.org/pandas-docs/stable/user_guide/options.html
"""
with pd.option_context("display.max_rows", 10, "display.max_columns", 2500, "display.max_colwidth", 160, "display.width", 2000,):
display(df)
# pdshow(d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment