I am trying to round a pandas datetime column to its nearest year or month but I cannot figure out how to do it. For instance, this minimal example rounds to the closest hour:

```py
pd.Timestamp.now().round('60min')

```

What I'd like is a way to replace the `'60min'` in order to round `pd.Timestamp.now()` to obtain either `2020-01-01` (for the year case) or `2019-08-01` (for the month case) (note that `now()` is exactly `2019-07-30 16:41:23.612004` at the time of asking!).

The [pandas.Series.dt.round](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.dt.round.html) doc suggest a `freq` argument linking to [this page](https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#timeseries-offset-aliases), but trying the months/years options there return this error:

```py
ValueError:  is a non-fixed frequency

```

Any idea what I am missing?