Wrapping text in a grid cell
Environment
Windows, Jupyter, Qgrid 1.1.1
Description of Issue
I have a dataframe with text. I would like to see my text wrapped in a cell (and ideally, the height of the cell adjusted automatically). Is there a way to do this in Qgrid? Because I can do it easily using pure pandas.
Reproduction Steps
Create dataframe
row = dict(title= 'CoT: Cooperative Training for Generative Modeling of Discrete Data',
tldr= 'We proposed Cooperative Training, a novel training algorithm for generative modeling of discrete data. We introduce stochastic state transition mechanism to RNNs, simplifies finite state automata (DFA) extraction, forces RNNs to operate more like automata with external memory, better extrapolation behavior and interpretability.')
df = pd.DataFrame([row])
Show wrapped text in pure pandas.
pd.set_option('display.max_colwidth', -1)
df
No wrapped text in Qgrid
qgrid.show_grid(df)
What steps have you taken to resolve this already?
I tried to use options from SlickGrid, but no help.
Anything else?
Any workaround will help.
I'd consider that very useful as well.
Only workaround I've come up with so far is inserting a line break (<br>) after every k-th word and increasing the row height. This is is rather unsatisfactory though, since it is inconvenient to have every row with the same height if the contained text differs in length.
Is there any update on when wrapping text in a cell can be implemented?
I'd consider this feature very useful as well.
I am also non stop looking for a pandas plotting solution enabling wrapping text
Any update for this?
Any update for this?
Wrapping is possible since last version @angusfong
@joseberlines that's great news; would you mind sharing a reference to the method?
@angusfong Hei I am sorry. I made a mistake. I thought I was talking about other library where this was recently implemented.
@joseberlines haha all good. What is this other library? The most important thing for me is an interactive table that (1) supports sorting and filtering; (2) integrates with Jupyter.
Ipydatagrid
I follow both repositories. I saw "grid" and my head drifted towards ipydatagrid.