Created
April 12, 2022 22:58
-
-
Save ChronoJon/cee8de9e8e34c37d58d288ff0f97e6ab to your computer and use it in GitHub Desktop.
Exploring assignments with multiindex column dataframes and subset assignment
My sentiment is that I've (sample size 1, but consulted with Pandas, used Pandas for years, and taught Pandas to thousands) never had a need for this. I'm not saying it might not happen. But perhaps that is why support is lacking... 🤷♀️
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I really don't understand this sentiment, but it is the not first time, I've read it. Hierarchical columns can be useful for grouping related data. Otherwise you would have to use multiple dataframes and
SQL
like association dataframes or resort to ugly filter calls to select these groups.In my view, the only problem with it is, that it's not well supported in panda's functional API. One could provide something like an
.assign_map
method (analogous tostr.format_map
) with pandas_flavor or similar.