Python Groupby Function:Percentile and Average
GroupBy is a powerful and versatile function in Python. It allows you to split your data into separate groups to perform computations for better analysis.
Lets consider the following dataset-
import pandas as pd
df = pd.read_csv("Desktop/groupby.csv")
df.head(8)
Output:
df_groupby_percentile = df.groupby('C').quantile(.5)
df_groupby_percentile
df_groupby_mean = df.groupby('C').mean()
df_groupby_mean
Similarly more functions can be performed using groupby.
For detailed information please follow following link-
Thank You for visiting
Comments
Post a Comment
If You have any doubt please let me know