Skip to main content

Pandas Mean Issue

I am trying to get the mean of rows in a pandas df. The result seems to be wrong

    print(df)
    df_temp = df.drop([str(dt.today().year)],axis=1)
  
    print(df_temp)  
     
    df['mean'] = df_temp.mean(axis=1,skipna=False)
    print(df)
    
 

enter image description here



source https://stackoverflow.com/questions/73365542/pandas-mean-issue

Comments