Skip to content

API: joining DatetimeIndexes not preserving freq #32157

Closed
@jbrockmendel

Description

@jbrockmendel
dti = pd.date_range('2016-01-01', periods=10)
left, right = dti[:5], dti[5:]
joined = left.join(right, how="outer")

In master joined.freq comes back as None, while in 0.25.3 it was "D". There is some code in DatetimeIndex._wrap_joined_index that suggests to me this was intentional.

Can someone confirm this suspicion cc @jorisvandenbossche ? If so, I've got a branch that restores the old behavior, just need to add tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DatetimeDatetime data dtype

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions