Skip to content

Instantly share code, notes, and snippets.

@rsalaza4
Last active May 10, 2022 16:36
Show Gist options
  • Select an option

  • Save rsalaza4/ff273e831aaca399cbac77ed396ff6f3 to your computer and use it in GitHub Desktop.

Select an option

Save rsalaza4/ff273e831aaca399cbac77ed396ff6f3 to your computer and use it in GitHub Desktop.
# Group masures by sample groups (x_bar)
df_grouped = df.groupby('sample_group').mean()
# Rename x-bar column
df_grouped.columns = ['x_bar']
df_grouped.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment