From bed6e526f3cfcb26b6837346c7247e506bca6b6d Mon Sep 17 00:00:00 2001 From: Julien Herzen Date: Mon, 24 Jan 2022 16:01:58 +0100 Subject: [PATCH] Remove broken type annotation (#752) * Remove broken type annotation * Solve issues with calling pandas mean() --- darts/timeseries.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/darts/timeseries.py b/darts/timeseries.py index 4e3d22a578..542b42a846 100644 --- a/darts/timeseries.py +++ b/darts/timeseries.py @@ -303,7 +303,7 @@ def _clean_component_list(columns) -> List[str]: @classmethod def from_csv( cls, - filepath_or_buffer: pd._typing.FilePathOrBuffer, + filepath_or_buffer, time_col: Optional[str] = None, value_cols: Optional[Union[List[str], str]] = None, fill_missing_dates: Optional[bool] = False, @@ -2442,7 +2442,7 @@ def with_columns_renamed( """ def mean( - self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs + self, axis=None, skipna=True, level=None, numeric_only=None, **kwargs ) -> float: """Simple wrapper around :func:`pd.DataFrame.mean()` for deterministic series.""" return self.pd_dataframe(copy=False).mean( @@ -2450,7 +2450,7 @@ def mean( ) def var( - self, axis=None, skipna=None, level=None, ddof=1, numeric_only=None, **kwargs + self, axis=None, skipna=True, level=None, ddof=1, numeric_only=None, **kwargs ) -> float: """Simple wrapper around :func:`pd.DataFrame.var()` for deterministic series.""" return self.pd_dataframe(copy=False).var( @@ -2458,7 +2458,7 @@ def var( ) def std( - self, axis=None, skipna=None, level=None, ddof=1, numeric_only=None, **kwargs + self, axis=None, skipna=True, level=None, ddof=1, numeric_only=None, **kwargs ) -> float: """Simple wrapper around :func:`pd.DataFrame.std()` for deterministic series.""" return self.pd_dataframe(copy=False).std( @@ -2466,7 +2466,7 @@ def std( ) def skew( - self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs + self, axis=None, skipna=True, level=None, numeric_only=None, **kwargs ) -> float: """Simple wrapper around :func:`pd.DataFrame.skew()` for deterministic series.""" return self.pd_dataframe(copy=False).skew( @@ -2474,7 +2474,7 @@ def skew( ) def kurtosis( - self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs + self, axis=None, skipna=True, level=None, numeric_only=None, **kwargs ) -> float: """Simple wrapper around :func:`pd.DataFrame.kurtosis()` for deterministic series.""" return self.pd_dataframe(copy=False).kurtosis( @@ -2482,7 +2482,7 @@ def kurtosis( ) def min( - self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs + self, axis=None, skipna=True, level=None, numeric_only=None, **kwargs ) -> float: """Simple wrapper around :func:`pd.DataFrame.min()` for deterministic series.""" return self.pd_dataframe(copy=False).min( @@ -2490,7 +2490,7 @@ def min( ) def max( - self, axis=None, skipna=None, level=None, numeric_only=None, **kwargs + self, axis=None, skipna=True, level=None, numeric_only=None, **kwargs ) -> float: """Simple wrapper around :func:`pd.DataFrame.max()` for deterministic series.""" return self.pd_dataframe(copy=False).max(