PablocFonseca / streamlit-aggrid

Implementation of Ag-Grid component for Streamlit
https://pypi.org/project/streamlit-aggrid/
MIT License
1.06k stars 202 forks source link

grid option from dataframe in 0.3.3 not working as usual #144

Closed imClumsyPanda closed 6 months ago

imClumsyPanda commented 2 years ago

After upgraded to 0.3.3, GridOptionsBuilder.from_dataframe is not working as usual. For example, column width is not automatic any more, and column with date like "2013-11-01" now shows in datetime format like "2013-11-01T00:00:00Z".

I was using 0.2.2 before update, and it worked well in former version. But sparkline is not supported as it is in 0.3.3.

imClumsyPanda commented 2 years ago

Just tried former versions like 0.3.2 and 0.3.1, automatic column width is supported in both versions, but date format is still shown in datetime format.

PablocFonseca commented 2 years ago

I had to change the way data is serialized to json in order to have faster conversion. The issue is how pandas serializes data. However you can use a custom formatted for date time columns

imClumsyPanda commented 2 years ago

Thanks for the reply. I’ve just tried to use gridoption cellRenderer to make date format work again. I’ll try to solve it from dataframe later and see if it works.

Pablo Fonseca @.***>于2022年9月6日 周二09:19写道:

I had to change the way data is serialized to json in order to have faster conversion. The issue is how pandas serializes data. However you can use a custom formatted for date time columns

— Reply to this email directly, view it on GitHub https://github.com/PablocFonseca/streamlit-aggrid/issues/144#issuecomment-1237562417, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLH5ET4XQ2NRK2EHVFMOA3V42LZLANCNFSM6AAAAAAQFLTC3M . You are receiving this because you authored the thread.Message ID: @.***>