What does the expression d + pd.Timedelta('1 days 2 hours') do to DatetimeIndex object d, defined below? d = pd.date_range('11-Sep-2017', '17-Sep-2017', freq='2D')

Questions & AnswersCategory: Programming LanguageWhat does the expression d + pd.Timedelta('1 days 2 hours') do to DatetimeIndex object d, defined below? d = pd.date_range('11-Sep-2017', '17-Sep-2017', freq='2D')
Adam asked 2 years ago

What does the expression d + pd.Timedelta(‘1 days 2 hours’) do to DatetimeIndex object d, defined below?

d = pd.date_range('11-Sep-2017', '17-Sep-2017', freq='2D')

a. Increases each datetime value by 1 day and 2 hours
b. Results in Error
c. Increases each datetime value by 1 day
d. No changes to each datetime value