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
Post a Comment