Skip to content

DOC: Index.take can have axis="index", in contrast to the claims int and always 0 #63189

@cmp0xff

Description

@cmp0xff

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

https://pandas.pydata.org/docs/dev/reference/api/pandas.Index.take.html

Documentation problem

axis being "index" is also accepted at run time, in contrast to the claim of being int and always 0.

import pandas as pd

pd.Series([1, 2, 3, 4]).take([1, 1, 2, 2], axis="index")

Suggested fix for documentation

        axis : {0 or 'index'}, optional
            The axis over which to select values, always 0 or 'index'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsIndexRelated to the Index class or subclasses

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions