Many a times, we have groups and might be interested to combine them thereby calculating standard deviation of dataset.
So this recipe is a short example on how to compute standard error of mean of groups in pandas. Let's get started.
import pandas as pd import seaborn as sb
Let's pause and look at these imports. Pandas is generally used for performing mathematical operation and preferably over arrays. Seaborn is just used in here to import dataset.
df = sb.load_dataset('tips') print(df.head())
Here we have imported tips dataset from seaborn library.
Here we have performed groupby on certain columns and finally taking out the standard error of our dataset.
Once we run the above code snippet, we will see:
Scroll down to the ipython file to look at the results.
We can see standard error being found out for each groups.