I have obtained the statistics for my dataframe by df.describe() in Pandas.
statistics = df.describe()
I want to filter the statistics dataframe base on count:
main Meas1 Meas2 Meas3 Meas4 Meas5
sublvl Value Value Value Value Value
count 7.000000 1.0 1.0 582.00 97.000000
mean 30 37.0 26.0 33.03 16.635350
I want to get something like that: filter out all Values with count less than 30 and show me only the columns with count >30 in a new dataframe (or give me a list with all main that have count>30).
For the above example, I want:
main Meas4 Meas5
sublvl Value Value
count 582.00 97.000000
mean 33.03 16.635350
and [Meas4, Meas5]
I have tried
thresh = statistics.columns[statistics['count']>30]
And variations thereof.