TODO: In pandas 2.0, mean is implemented for datetimes, but Dask returns None.
(df, col=None)
| 64 | |
| 65 | |
| 66 | def _drop_mean(df, col=None): |
| 67 | """TODO: In pandas 2.0, mean is implemented for datetimes, but Dask returns None.""" |
| 68 | if isinstance(df, pd.DataFrame): |
| 69 | df.at["mean", col] = np.nan |
| 70 | df.dropna(how="all", inplace=True) |
| 71 | elif isinstance(df, pd.Series): |
| 72 | df.drop(labels=["mean"], inplace=True, errors="ignore") |
| 73 | else: |
| 74 | raise NotImplementedError("Expected Series or DataFrame with mean") |
| 75 | return df |
| 76 | |
| 77 | |
| 78 | def test_Dataframe(): |
no test coverage detected