How to disable sorting of columns while using St.dataframe?

I want to have all the features of data frame except sorting of columns? Is there way to disable sorting ?

1 Like

Hey @Survivalofthefittest,

There isn’t a way to disable sorting with st.dataframe; however, you can use st.table instead

1 Like

Thank you @Caroline- Apprciate your quick response.
… I wanted to retain all other features of data frame. Table is pretty basic.
Is there any other way? Through script or. something?
How do you disable once row numbers go over 150k? Can I use that one? And if yes - how?

1 Like

Unfortunately there isn’t a built-in way to disable sorting in st.dataframe. It’s true that sorting will get disabled automatically once you have over 150k rows, so hypothetically you could just use a larger dataset, but that’s probably not a super practical solution.

1 Like

@Caroline - thank you

2 Likes

Hi!

Does anyone have a trick for this? I have a column representing a duration, and after formatting its display as text, the sorting doesn’t work anymore, so I would like to disable it.

Thanks in advance.

1 Like

Hi @Caroline is it possible to disable sorting for a particular row?

1 Like

Hi @reelmreynes use pandas.styler for formatting the duration column it will format without changing the dtypes so that we can mitigate the sorting issue

2 Likes

Thank you for the tip @Ameen ! It really helped me out of my situation! :slight_smile:

2 Likes