BUG: `max` and `min` returns incorrect result
- [x] I have checked that this issue has not already been reported.

- [x] I have confirmed this bug exists on the latest version of pandas.

- [ ] (optional) I have confirmed this bug exists on the master branch of pandas.

---

**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to provide the necessary information for us to reproduce your bug.

#### Code Sample, a copy-pastable example

```python
# Your code here
import pandas
import numpy as np
df = pandas.DataFrame(
    {
        "int_col": [-5, 2, 7, 16],
        "float_col": [np.NaN, -9.4, 10.1, np.NaN],
        "str_col": ["a", np.NaN, "c", "d"],
        "bool_col": [False, True, True, False],
    }
)
df
   int_col  float_col  bool_col
0       -5        NaN     False
1        2       -9.4      True
2        7       10.1      True
3       16        NaN     False
# pandas 1.1.5 behavior:
df.max(axis=0, numeric_only=True)
int_col      16.0
float_col    10.1
bool_col      1.0
dtype: float64
# pandas 1.2.1 behavior:
df.max(axis=0, numeric_only=True)
int_col        16
float_col    10.1
bool_col     True
dtype: object

# the difference is in last two lines
bool_col      1.0
dtype: float64
# and
bool_col     True
dtype: object
```

#### Problem description

The same relates to `min`.

#### Expected Output

#### Output of ``pd.show_versions()``

<details>

pandas           : 1.2.1
numpy            : 1.19.5
pytz             : 2020.5
dateutil         : 2.8.1
pip              : 20.3.3
setuptools       : 52.0.0.post20210125
Cython           : None
pytest           : 6.2.1
hypothesis       : None
sphinx           : 3.4.3
blosc            : None
feather          : 0.4.1
xlsxwriter       : None
lxml.etree       : 4.6.2
html5lib         : None
pymysql          : None
psycopg2         : None
jinja2           : 2.11.2
IPython          : 7.19.0
pandas_datareader: None
bs4              : 4.9.3
bottleneck       : None
fsspec           : 0.8.3
fastparquet      : None
gcsfs            : None
matplotlib       : 3.2.2
numexpr          : 2.7.2
odfpy            : None
openpyxl         : 3.0.6
pandas_gbq       : None
pyarrow          : 2.0.0
pyxlsb           : None
s3fs             : 0.5.2
scipy            : 1.6.0
sqlalchemy       : 1.3.22
tables           : 3.6.1
tabulate         : None
xarray           : 0.16.2
xlrd             : 2.0.1
xlwt             : None
numba            : None

</details>
