i am using pandastable to display pandas dataframes in a tkinter GUI. I have one dataframe that only has one row and three columns so I want to display it vertically to save space in my GUI. The original table is something like:
Max | Min | Average
25.2 | 1.24 | 17.89
And I want it to ultimately look like:
Max | 25.2
Min | 1.24
Average | 17.89
I've tried to transpose the dataframes before creating the pandastable and transpose the pandastable Table object but neither works. I get this error when trying to do:
agg_pt = Table(dataframe=agg_df)
agg_pt.transpose()
IndexError: list index out of range
Because transpose is applicable for dataframe. The agg_pt is not an dataframe type. you can transpose the dataframe and after convert to table like this
I hope this will work for you case