Skip to content

0.24.0 DateTimeIndex: union() got an unexpected keyword argument 'sort' #24994

Closed
@bilalkamoon

Description

@bilalkamoon

Code Sample, a copy-pastable example if possible

import pandas as pd
index1 = pd.DataFrame(index=pd.to_datetime(['19900101'])).index
index2 = index1.copy()
index1.union(index2, sort=False)
TypeError: union() got an unexpected keyword argument 'sort'

Problem description

The 'sort' argument works with 'difference' and 'intersection' but fails on 'union' for DateTimeIndex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DatetimeDatetime data dtypeTimedeltaTimedelta data type

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions