6.1 Train a `RandomForestRegressor` estimator with the parameters
20:59 04 May 2026

Develop a function that **receives** a dataset (`df`) and:

- Removes null values ​​from the dataset.

- Removes the columns `["HALTER_ID", "ALTER", "STADTKREIS", "STADTQUARTIER"]`.

- Replaces the values ​​"m" with zero (0) and "w" with one (1).

- Converts the categorical columns `["RASSE1"], ["RASSENTYP"], ["HUNDEFARBE"]` to numeric.

- Considers the column ["GEBURTSJAHR_HUND"] (the pet's birth year) as the ground truth.

- Allocate 85% of the dataset for the training process, also using the parameter `random_state=21`

- Train a `RandomForestRegressor` estimator with parameters `n_estimators=100` and `random_state=21`

- **Return** the `mean_squared_error`

- **Return** the `mean_absolute_error`


**Note:** You can use pandas' `pd.factorize` function to convert categorical columns to numeric:

python pandas