How to add N months to date using arrow in Python

If you have a date like

add_n_months_arrow.py
import arrow

dt = arrow.get("2021-05-27")

you can add N months (example: 18 months) to said date using

add_n_months_arrow_shift.py
dt.shift(months=+18)

The result will be an arrow representation of 2022-11-27


Check out similar posts by category: Python