python - Get period duration in pandas -


how period duration in pandas? example, if have data

periodindex  value 2017q1       1.156355 2017q2       0.815639 2017q3       0.798100 2017q4       1.027752 

how duration of each of indeces? end_time - start_time, gets wrong timedelta('30 days 23:59:59.999999') january , have round somehow. need multiply value amount of days, can resample data days, ffil, resample q sum, doesn't seem efficient.

edit: of course in example can multiply timedelta/timedelta('1 day'), in general if duration of period needed, there no built in function?


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -