From 3f39c5755626b39e340e6efa9a542f29b777d1de Mon Sep 17 00:00:00 2001 From: cloudboat <15851404+cloudboat111@user.noreply.gitee.com> Date: Tue, 25 Nov 2025 21:42:55 +0800 Subject: [PATCH] DOC: fix axis parameter description in Index.take --- pandas/core/indexes/base.py | 8 ++++---- pandas/core/indexes/multi.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 0f9938916b8df..faa63f71b3747 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -1180,8 +1180,8 @@ def astype(self, dtype: Dtype, copy: bool = True): ---------- indices : array-like Indices to be taken. - axis : int, optional - The axis over which to select values, always 0. + axis : {0 or 'index'}, optional + The axis over which to select values, always 0 or 'index'. allow_fill : bool, default True How to handle negative values in `indices`. @@ -1234,8 +1234,8 @@ def take( ---------- indices : array-like Indices to be taken. - axis : int, optional - The axis over which to select values, always 0. + axis : {0 or 'index'}, optional + The axis over which to select values, always 0 or 'index'. allow_fill : bool, default True How to handle negative values in `indices`. diff --git a/pandas/core/indexes/multi.py b/pandas/core/indexes/multi.py index 43e6469e078f0..e810f09ae3cd2 100644 --- a/pandas/core/indexes/multi.py +++ b/pandas/core/indexes/multi.py @@ -2303,8 +2303,8 @@ def take( ---------- indices : array-like Indices to be taken. - axis : int, optional - The axis over which to select values, always 0. + axis : {0 or 'index'}, optional + The axis over which to select values, always 0 or 'index'. allow_fill : bool, default True How to handle negative values in `indices`.