Skip to content

Silently ignored kwargs in Index.to_series #18699

Closed
@jbrockmendel

Description

@jbrockmendel
>>> idx = pd.date_range('1994-10-06', freq='D', periods=4)
>>> idx.day.to_series(index=idx)
>>> idx.day.to_series(index=idx)
6    6
7    7
8    8
9    9

Expected:

>>> idx.day.to_series(index=idx)
1994-10-06    6
1994-10-07    7
1994-10-08    8
1994-10-09    9

Looks like Index.to_series takes **kwargs but then ignores them. Should be an easy fix; would be nice to systematically track down other places this might happen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    API DesignIndexingRelated to indexing on series/frames, not to indexes themselves

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions