Skip to content

Series[timedelta64] +/- TimedeltaIndex inherits name from TimedeltaIndex #19043

Closed
@jbrockmendel

Description

@jbrockmendel

Opening mainly for an issue to reference in upcoming PR.

This behavior is not present in 0.22.0, is present in master as of 04beec7

tdi = pd.TimedeltaIndex(['1day', '2days', '3days'])
ser = pd.Series(tdi)
tdi.name = 'foo'
ser.name = 'bar'

>>> (tdi + ser).name
'foo'
>>> (ser + tdi).name
'foo'
>>> (ser - tdi).name
'foo'
>>> (tdi - ser).name
'foo'

These names should all be coming back as None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions