What's going on here? I need to create a data frame with the start dates of the month, (1-1-2014 to 12-1-2014) fwiw I use the variable fcast_year in another place where I need the end of the month, therefore, the math of the date
from pandas.tseries.offsets import * fcast_yr=pd.to_datetime('2014-12-31') x=(fcast_yr + pd.DateOffset(days= -30))
Gives the values ββof the end of the month .... yech !!
['2014-01-31T18:00:00.000000000-0600' '2014-02-28T18:00:00.000000000-0600' '2014-03-31T19:00:00.000000000-0500' '2014-04-30T19:00:00.000000000-0500' '2014-05-31T19:00:00.000000000-0500' '2014-06-30T19:00:00.000000000-0500' '2014-07-31T19:00:00.000000000-0500' '2014-08-31T19:00:00.000000000-0500' '2014-09-30T19:00:00.000000000-0500' '2014-10-31T19:00:00.000000000-0500' '2014-11-30T18:00:00.000000000-0600' '2014-12-31T18:00:00.000000000-0600']
Using 13.0 pf Pandas
python pandas
dartdog
source share