Skip to content

ENH/API: Decide what to return Period - Period subtraction #13077

Closed
@sinhrks

Description

@sinhrks

Code Sample, a copy-pastable example if possible

Split from #13071. Currently it returns int and loses freq info.

pd.Period('2011-03', freq='M') - pd.Period('2011-01', freq='M') 
#2

Expected Output

Current ideas are:

  1. Return Timedelta adding support of Monthly freq.
  2. Return Perioddelta newly created.
  3. Return DateOffset.

output of pd.show_versions()

on current master.

CC: @jreback @MaximilianR

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions