File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
72
72
-i " pandas.Series.dt PR01" ` # Accessors are implemented as classes, but we do not document the Parameters section` \
73
73
-i " pandas.MultiIndex.get_level_values SA01" \
74
74
-i " pandas.MultiIndex.get_loc_level PR07" \
75
- -i " pandas.MultiIndex.levshape SA01" \
76
75
-i " pandas.MultiIndex.names SA01" \
77
76
-i " pandas.MultiIndex.remove_unused_levels RT03,SA01" \
78
77
-i " pandas.MultiIndex.reorder_levels RT03,SA01" \
Original file line number Diff line number Diff line change @@ -1051,7 +1051,19 @@ def nlevels(self) -> int:
1051
1051
@property
1052
1052
def levshape (self ) -> Shape :
1053
1053
"""
1054
- A tuple with the length of each level.
1054
+ A tuple representing the length of each level in the MultiIndex.
1055
+
1056
+ In a `MultiIndex`, each level can contain multiple unique values. The
1057
+ `levshape` property provides a quick way to assess the size of each
1058
+ level by returning a tuple where each entry represents the number of
1059
+ unique values in that specific level. This is particularly useful in
1060
+ scenarios where you need to understand the structure and distribution
1061
+ of your index levels, such as when working with multidimensional data.
1062
+
1063
+ See Also
1064
+ --------
1065
+ MultiIndex.shape : Return a tuple of the shape of the MultiIndex.
1066
+ MultiIndex.levels : Returns the levels of the MultiIndex.
1055
1067
1056
1068
Examples
1057
1069
--------
You can’t perform that action at this time.
0 commit comments