Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas new df from groupby

df = pd.DataFrame(old_df.groupby(['groupby_attribute'])['mean_attribute'].mean())
df = df.reset_index()
df
 
PREVIOUS NEXT
Tagged: #pandas #df #groupby
ADD COMMENT
Topic
Name
5+5 =