How to create a Multi-index dataframe

  • #1
53
6

Attachments

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

Answers and Replies

  • #2
StoneTemplePython
Science Advisor
Gold Member
1,184
583
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
581
  • Last Post
Replies
9
Views
17K
Replies
5
Views
456
Replies
9
Views
1K
Replies
15
Views
890
Replies
1
Views
697
Replies
2
Views
20K
  • Last Post
Replies
3
Views
239
Replies
5
Views
2K
Replies
9
Views
16K
Top