Skip to content

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Jul 10, 2016

pd.NaT + 1
# pd.NaT

Added tests for following:

  • Period and PeriodIndex, Series ops
    • add, sub, comp
  • PeriodIndex creation from list-like which contains Period and NaT (ENH: PeriodIndex now accepts pd.NaT #13430)
  • PeriodIndex boxing
  • .to_period
  • __contains__ any NaT-like(pd.NaT, None, float('nan'), np.nan)

@sinhrks sinhrks added Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Period Period data type labels Jul 10, 2016
@sinhrks sinhrks added this to the 0.19.0 milestone Jul 10, 2016
@sinhrks
Copy link
Member Author

sinhrks commented Jul 10, 2016

CC @MaximilianR

@sinhrks sinhrks changed the title (WIP)API: Change Period('NAT') to return NaT API: Change Period('NAT') to return NaT Jul 11, 2016
@codecov-io
Copy link

codecov-io commented Jul 11, 2016

Current coverage is 84.38%

Merging #13609 into master will decrease coverage by <.01%

@@             master     #13609   diff @@
==========================================
  Files           142        142          
  Lines         51225      51225          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          43225      43224     -1   
- Misses         8000       8001     +1   
  Partials          0          0          

Powered by Codecov. Last updated by 20de266...9305c36

``Period('NaT')`` now returns ``pd.NaT``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Previously, ``Period`` has its own ``Periond('NaT')`` representation different from ``pd.NaT``. Now ``Period('NaT')`` has been changed to return ``pd.NaT``. (:issue:`12759`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Periond -> Period

@jorisvandenbossche
Copy link
Member

@sinhrks Can you rebase this? Then it will be easier to review the additional changes (as I think the first commit is now already in master?)

@sinhrks sinhrks force-pushed the period_nat branch 2 times, most recently from 0937517 to 3aff2be Compare July 11, 2016 11:22
@sinhrks
Copy link
Member Author

sinhrks commented Jul 12, 2016

@jorisvandenbossche sure. rebased.

@jreback
Copy link
Contributor

jreback commented Jul 15, 2016

thanks @sinhrks this is really nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Period Period data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API: Change Period('NAT') to return NaT, not Period instance
4 participants