Friday 15 July 2011

python - losing time information with dateoffset and bdate_range in pandas -


I am looking at the following behavior while using dateoffices in pdf. [25]: Import pandas pnd d = pnd.Timestamp ('2013-01-01 16:00') Dates = pnd.bdate_range (start = d, end = d + pnd) in

  .DateOffset (days = 5)) as for d1 dates: Print D1 2013-01-01 00:00:00 2013-01-02 00:00:00 2013-01-03 00:00:00 2013 -01-04 00:00:00   

I am missing time information is a way to generate date ranges that looks,

  2013-01-01 16:00:00 2013-01-02 16:00:00 2013-01-03 16: 00:00 2013-01-04 16:00:00    

You can use the normal of the bdate_range argument (which Default to d [11]: [11]: dates = pnd.bdate_range (start = d, end = D + pnd.DateOffset (day = 5), general = = false) in [11]:

  in [12] ]: For D1 dates: Print D1 2013-01-01 16:00:00 2013-01-02 16:00:00 2013 -01-03 16:00:00 2013-01-04 16:00 : 00   

Note: There are similar arguments in some common functions: base .

No comments:

Post a Comment