File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Expand file tree Collapse file tree 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
7272 -i " pandas.Series.dt PR01" ` # Accessors are implemented as classes, but we do not document the Parameters section` \
7373 -i " pandas.MultiIndex.append PR07,SA01" \
7474 -i " pandas.MultiIndex.copy PR07,RT03,SA01" \
75- -i " pandas.MultiIndex.drop PR07,RT03,SA01" \
7675 -i " pandas.MultiIndex.get_level_values SA01" \
7776 -i " pandas.MultiIndex.get_loc PR07" \
7877 -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]
23162316 """
23172317 Make a new :class:`pandas.MultiIndex` with the passed list of codes deleted.
23182318
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+
23192325 Parameters
23202326 ----------
23212327 codes : array-like
23222328 Must be a list of tuples when ``level`` is not specified.
23232329 level : int or level name, default None
2330+ Level from which the labels will be dropped.
23242331 errors : str, default 'raise'
2332+ If 'ignore', suppress error and existing labels are dropped.
23252333
23262334 Returns
23272335 -------
23282336 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.
23292345
23302346 Examples
23312347 --------
You can’t perform that action at this time.
0 commit comments