After an data frame aggregation with group by I’m trying to “flatten” the headers into one to properly export the data as CSV: The output looks like that: If I call the data frame directly, I get a different information: Output: It seems like pandas merged the column names, but I still have two levels of column description. If I