Pandas groupby().sem reorders by columns after adding a non-numeric column

216 views Asked by At

first time asking a question: I'm using

print(df.groupby(['SIDE']).sem())

get correct results when "Sector" column, the last in the data set has a heading but no data but after populating non-numeric data in the column it returns data frame with columns in different order. I'm also using

df.groupby('SIDE').mean()
df.groupby('SIDE').std()

with no issues on the same data, feeling stuck, seems like a bug?

enter image description here

After adding non-numeric data to column

0

There are 0 answers