Skip to content

Instantly share code, notes, and snippets.

@samukweku
Last active October 12, 2025 06:34
Show Gist options
  • Select an option

  • Save samukweku/16102c5ca7e072770204abc6c2950464 to your computer and use it in GitHub Desktop.

Select an option

Save samukweku/16102c5ca7e072770204abc6c2950464 to your computer and use it in GitHub Desktop.
pandas nested groupby limitations
data = pd.DataFrame({'id':[1,1,1,2,2,2],'sales':[4,1,2,7,6,7],'views':[3,1,2,8,6,7]})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment