Multi-Indexing in Single Column - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: Multi-Indexing in Single Column (/thread-30336.html) |
Multi-Indexing in Single Column - illmattic - Oct-16-2020 Hello, I'm trying to create a more visually appealing dataframe and so I want my index to be broken down into categories with different headings.I tried various ways to do this with no luck. Multi-Indexing seems like my best chance but I don't want it in two column as my desire is to have simple headings or titles within the index. Is this possible? Thank you RE: Multi-Indexing in Single Column - jefsummers - Oct-16-2020 Not sure I understand, but I would suggest using .map to get multiple columns with values - commonly used for "one hot" encoding. RE: Multi-Indexing in Single Column - illmattic - Oct-16-2020 (Oct-16-2020, 05:32 PM)jefsummers Wrote: Not sure I understand, but I would suggest using .map to get multiple columns with values - commonly used for "one hot" encoding. Don't think this will do the trick. Currently I have a dataframe with a dozen or so index items as such: I want to organize the index into groups that will each have a heading. I want something like this: Where ASSETS and LIABILITIES are in the index but have no data, they are just the headings of index components.
|