Hello Everybody!!
I have one column in a dataframe that has a set of dates as pandas.series, like these examples:
1458641 2016-04-22 06:57:41
1458642 2016-01-05 15:56:26
....
And im trying to set if the date is an american holiday, so i tried this:
...
But all dates were set as FALSE, even with date '2016-01-01' in the both dataframe column and datettimeindex.
Can Anybody help me!?
Thx,
I have one column in a dataframe that has a set of dates as pandas.series, like these examples:
1458641 2016-04-22 06:57:41
1458642 2016-01-05 15:56:26
....
And im trying to set if the date is an american holiday, so i tried this:
...
from pandas.tseries.holiday import USFederalHolidayCalendar cal = USFederalHolidayCalendar() holidays = pd.to_datetime(cal.holidays(start='2016-01-01', end='2016-06-30')) completo['IsHoliday'] = pd.to_datetime(completo['pickup_datetime']).dt.date in holidays print(completo[completo['IsHoliday']==True])...
But all dates were set as FALSE, even with date '2016-01-01' in the both dataframe column and datettimeindex.
Can Anybody help me!?
Thx,