quantopian / qgrid

An interactive grid for sorting, filtering, and editing DataFrames in Jupyter notebooks
Apache License 2.0
3.03k stars 424 forks source link

Format cell display #361

Open sebastiandemetal opened 3 years ago

sebastiandemetal commented 3 years ago

Environment

Description of Issue

Display format of timedeldata objects

Reproduction Steps

import numpy as np
import pandas as pd

# td = np.random.randint(1, 400,400)

df = pd.DataFrame([pd.Timedelta(days=d) for d in td],columns=['timeDelta'])

import qgrid
display(qgrid.show_grid(df))
display(df)

What steps have you taken to resolve this already?

None

dahanaclsa commented 3 years ago

Same problem here but I have a temporary fix. You can use: qgrid.set_grid_option('forceFitColumns', False) And eventualy increase default column width for more visibility: qgrid.set_grid_option('defaultColumnWidth', 100) Hope this help