Pandas changed the behaviour of the numeric_only argument of the pandas.DataFrame.mean in v1.5.0. Prior to that version, the default behaviour was to try to compute the mean in all the columns and then try only in numeric columns. Now, it tries to compute the mean using all the columns and raises an error if not numeric columns are found.
The code has been modified to compute the mean only in the required numeric columns.
Pandas changed the behaviour of the numeric_only argument of the pandas.DataFrame.mean in v1.5.0. Prior to that version, the default behaviour was to try to compute the mean in all the columns and then try only in numeric columns. Now, it tries to compute the mean using all the columns and raises an error if not numeric columns are found.
The code has been modified to compute the mean only in the required numeric columns.