Я пробовал:
Код: Выделить всё
from pandas.tseries.holiday import USFederalHolidayCalendar
from pandas.tseries.offsets import CustomBusinessDay
us_bd = CustomBusinessDay(calendar=USFederalHolidayCalendar())
projects_df['start_date'] = pd.to_datetime(projects_df['start_date'])
projects_df['current_date'] = pd.to_datetime(projects_df['current_date'])
projects_df['days_count'] = len(pd.date_range(start=projects_df['start_date'], end=projects_df['current_date'], freq=us_bd))
Код: Выделить всё
Cannot convert input....start_date, dtype: datetime64[ns]] of type to Timestamp
Подробнее здесь: https://stackoverflow.com/questions/724 ... ing-pandas
Мобильная версия