Skip to content

Instantly share code, notes, and snippets.

@sburns
Created August 5, 2014 18:23
Show Gist options
  • Save sburns/dfc70a3952e05ee3d32f to your computer and use it in GitHub Desktop.
Save sburns/dfc70a3952e05ee3d32f to your computer and use it in GitHub Desktop.
pandas dateutil awesome sauce
In [2]: import pandas as pd
In [3]: p = pd.Period('4Q2005')
In [4]: p.start_time
Out[4]: Timestamp('2005-10-01 00:00:00')
In [5]: p.end_time
Out[5]: Timestamp('2005-12-31 23:59:59.999999999')
In [7]: p.end_time.date()
Out[7]: datetime.date(2005, 12, 31)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment