File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
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.append PR07,SA01" \
74
74
-i " pandas.MultiIndex.copy PR07,RT03,SA01" \
75
- -i " pandas.MultiIndex.drop PR07,RT03,SA01" \
76
75
-i " pandas.MultiIndex.get_level_values SA01" \
77
76
-i " pandas.MultiIndex.get_loc PR07" \
78
77
-i " pandas.MultiIndex.get_loc_level PR07" \
Original file line number Diff line number Diff line change @@ -2316,16 +2316,32 @@ def drop( # type: ignore[override]
2316
2316
"""
2317
2317
Make a new :class:`pandas.MultiIndex` with the passed list of codes deleted.
2318
2318
2319
+ This method allows for the removal of specified labels from a MultiIndex.
2320
+ The labels to be removed can be provided as a list of tuples if no level
2321
+ is specified, or as a list of labels from a specific level if the level
2322
+ parameter is provided. This can be useful for refining the structure of a
2323
+ MultiIndex to fit specific requirements.
2324
+
2319
2325
Parameters
2320
2326
----------
2321
2327
codes : array-like
2322
2328
Must be a list of tuples when ``level`` is not specified.
2323
2329
level : int or level name, default None
2330
+ Level from which the labels will be dropped.
2324
2331
errors : str, default 'raise'
2332
+ If 'ignore', suppress error and existing labels are dropped.
2325
2333
2326
2334
Returns
2327
2335
-------
2328
2336
MultiIndex
2337
+ A new MultiIndex with the specified labels removed.
2338
+
2339
+ See Also
2340
+ --------
2341
+ MultiIndex.remove_unused_levels : Create new MultiIndex from current that
2342
+ removes unused levels.
2343
+ MultiIndex.reorder_levels : Rearrange levels using input order.
2344
+ MultiIndex.rename : Rename levels in a MultiIndex.
2329
2345
2330
2346
Examples
2331
2347
--------
You can’t perform that action at this time.
0 commit comments