How to subtract 5 minutes from pandas Timestamp

In our previous post we showed how to create a pandas Timestamp representing the current point in time:

example.py
pd.Timestamp('now')

You can subtract 5 minutes from that timestamp by using Timedelta(5, 'minutes'):

example.py
pd.Timestamp('now') - pd.Timedelta(5, 'minutes')

Check out similar posts by category: Pandas, Python