question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ENH: Add pd.to_period

See original GitHub issue

Would return Period or PeriodIndex, analogous to functions like to_datetime and to_timedelta.

xref #5886 xref #14048

cc @sinhrks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jorisvandenbosschecommented, Aug 29, 2016

If we follow the same policy as #8254, DatetimeIndex.to_period should be deprecated in favor of this.

IMO that is not needed. The current Index.to_datetime was for parsing non-time values to datetime (wich is the core business of pd.to_datetime). Where DatetimeIndex/Timestamp.to_period and PeriodIndex/Period.to_timestamp are methods for converting between the different time representations.

1reaction
sinhrkscommented, Aug 29, 2016

If we follow the same policy as #8254, DatetimeIndex.to_period should be deprecated in favor of this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ENH: Support datetime.date in Period Index · Issue #10798 · pandas ...
PeriodIndexs should resolve when datetime.date is passed into in, but doesn't. Example below. Tracing this through, it looks like parse_time_string is ...
Read more >
pandas.Series.dt.to_period — pandas 1.5.2 documentation
Converts DatetimeArray/Index to PeriodArray/Index. Parameters. freqstr or Offset, optional. One of pandas' offset strings or an Offset object. Will be ...
Read more >
Defining Absence Entitlement Elements - Oracle Help Center
Add. When entitlement is resolved. VACATION_TAKE (units paid) ... Values are stored on the absence results table and carried forward from period to...
Read more >
MAR50 - Credit valuation adjustment framework
This chapter sets out how to calculate capital requirements to cover credit valuation adjustment risk.
Read more >
Efficacy of Proximal Aspiration Thrombectomy for Using ...
... with period-to-period analysis (period 1 : standard MT without PAT; period 2 : PAT first, then standard MT for the remaining occlusion)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found