I used following code to get a dataframe groupby table
df1=df.groupby(['timestampEpochSecond'],sort=True)['metricValue'].sum().sort_values(ascending=False)
df_summary=pd.Series.to_frame(df1)
df_summary.reset_index(inplace=True)
df_summary.rename(index=str,columns= {'timestampEpochSecond':'splunk_query_mins'},inplace=True)
df_summary
The table is like
splunk_query_mins
metricValue
0 2018-12-13 06:41 1200.0
1 2018-12-13 06:07 238.0
2 2018-12-13 06:47 42.0
3 2018-12-13 09:54 14.0
4 2018-12-13 16:40 10.0
5 2018-12-12 21:30 5.0
6 2018-12-13 08:12 3.0
7 2018-12-13 01:11 3.0
8 0 0.0
However, when I used
df1.sort_values(by=''splunk_query_mins',ascending=True)
I got the error TypeError: '>' not supported between instances of 'int' and 'str' Again, thank you so much for helping me