Skip to content

Ariefah Shalihah

  • Home
  • About

How to flatten a hierarchical index in pandas DataFrame columns in Python

use join() and strip()

Use DataFrame.columns.get_level_values()



how-to-flatten-a-hierarchical-index-in-pandas-dataframe-columns-in-python

Categories PYTHON
Post navigation
How to find the unique values in multiple columns of a Pandas DataFrame in Python
How to force Keras with TensorFlow back-end to run using either CPU or GPU in Python

Recent Posts

  • How asynchronously call methods in Python
  • How get a function name as a string in Python
  • How pretty print a JSON file in Python
ariefahshalihah