| 1160 | # Enabling mean changes the behavior of DataFrame.mean |
| 1161 | # See https://github.com/pandas-dev/pandas/issues/24752 |
| 1162 | def test_nanmean(self, unit): |
| 1163 | dti = pd.date_range("2016-01-01", periods=3).as_unit(unit) |
| 1164 | expected = dti[1] |
| 1165 | |
| 1166 | for obj in [dti, dti._data]: |
| 1167 | result = nanops.nanmean(obj) |
| 1168 | assert result == expected |
| 1169 | |
| 1170 | dti2 = dti.insert(1, pd.NaT) |
| 1171 | |
| 1172 | for obj in [dti2, dti2._data]: |
| 1173 | result = nanops.nanmean(obj) |
| 1174 | assert result == expected |
| 1175 | |
| 1176 | @pytest.mark.parametrize("constructor", ["M8", "m8"]) |
| 1177 | def test_nanmean_skipna_false(self, constructor, unit): |