Relative Content

Tag Archive for pythonexploratory-data-analysis

I need to find the difference between the average values of the unique values in a variable

I have a dataset called df and I want to analyze the difference between the average values of 2 unique values.
Gear column has 2 categorical values which are Automatic and Manual while Power column has numerical values.
I have calculated the mean power values of Gear using df.groupby(“gear”)[“power”].mean() which results in Automatic: 112.62.
Manual: 104.696