Confidence Interval in Python dataframe

后端 未结 2 420
刺人心
刺人心 2021-01-06 00:11

I am trying to calculate the mean and confidence interval(95%) of a column \"Force\" in a large dataset. I need the result by using the groupby function by grouping differen

2条回答
  •  悲哀的现实
    2021-01-06 00:39

    As mentioned in the comments, I could not duplicate your error, but you can try to check that your numbers are stored as numbers and not as strings. use df.info() and make sure that the relevant columns are float or int:

    
    RangeIndex: 6 entries, 0 to 5
    Data columns (total 2 columns):
    Class    6 non-null object   # <--- non-number column
    Force    6 non-null int64    # <--- number (int) column
    dtypes: int64(1), object(1)
    memory usage: 176.0+ bytes
    

提交回复
热议问题