How to create a Multi-index dataframe

  • #1
53
6

Attachments

  • p1.png
    p1.png
    1.8 KB · Views: 456

Answers and Replies

  • #2
StoneTemplePython
Science Advisor
Gold Member
1,203
597
I haven't gotten into the weeds of this in while, but I think what you're asking is simply not in Pandas. Pandas is designed, in effect, to be excel spreadsheets via python (with the added capabilities that come with it).

Spreadsheets are fundamentally indexed with (i,j) pairs. There is no third index. (You could try to synthetically creating such a thing via a mapping formula that you come up with though that sounds unpleasant).

If you want to use (i,j,k) indexing, this is 3-D tensor territory that is easy to manipulate via arrays in Numpy. It is not Pandas.
 

Related Threads on How to create a Multi-index dataframe

Replies
5
Views
783
Replies
9
Views
2K
Replies
15
Views
1K
Replies
1
Views
920
  • Last Post
Replies
9
Views
17K
Replies
5
Views
2K
Replies
21
Views
2K
  • Last Post
Replies
3
Views
497
Replies
9
Views
17K
Top