This is the inner construction of pandas. Do not use a tuple because:
- It inherits from the general pandas class
- Its customizable (e.g. editor)
- It does not have absolutely all tuple functions (some of them are disabled)
- This is nots hashable (it looks more like a list here, not a tuple)
The construct is used to represent levels, labels, and names of MultiIndex. The point is to prevent the modification of these attributes and force the use of methods (for example, set_levels() ). Since their state cannot be changed independently (for level / labels), but must be changed together.
These are โpublicly availableโ properties, so an access mechanism that could do all this (and still have to be changed if necessary for performance reasons) is required for this.
Jeff
source share