Skip to content

Instantly share code, notes, and snippets.

@AayushSameerShah
Created May 28, 2021 15:11
Show Gist options
  • Save AayushSameerShah/1e8888fedaf8f5b7e95ce19c2c646b52 to your computer and use it in GitHub Desktop.
Save AayushSameerShah/1e8888fedaf8f5b7e95ce19c2c646b52 to your computer and use it in GitHub Desktop.
This is gonna be AMAZING time saver. When you want to get all values from the index but that is in the form of multiindex, use this (don't write for loop as you did!)
# AMAZING!
df.columns.get_level_values(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment