Adding Or Substracting Time
Goal¶
This post aims to add or subtract time from date column using pandas:
- Pandas
Reference:
- Chris Albon's blog (I look at his post's title and wrote my own contents to deepen my understanding about the topic.)
Library¶
In [1]:
import pandas as pd
Create date columns using date_range¶
In [2]:
date_rng = pd.date_range(start='20160101', end='20190101', freq='m', closed='left')
date_rng
Out[2]: