pythonpandasdataframeipywidgetspython-interactive

How to change cell value alignment in ipysheet sheet from a pandas dataframe


how can i change the alignment of an entire column or an individual cell in ipysheet ?

I tried :

for k,c in enumerate(sheet1.cells):
    c.style['textAlign']='left'

but it doesnt work (might be deprecated). I was expecting the values in the cells to be displayed with the text starting on the left-most side of the cell, but nothing changed.

Thank you !


Solution

  • I actually answered my own question, you just have to add c.send_state() at the end of the for loop that i showed in the question.