Skip to content

Commit

Permalink
Remove broken type annotation (#752)
Browse files Browse the repository at this point in the history
* Remove broken type annotation

* Solve issues with calling pandas mean()
  • Loading branch information
hrzn authored Jan 24, 2022
1 parent d94428a commit bed6e52
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions darts/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -2442,55 +2442,55 @@ 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(
axis, skipna, level, numeric_only, **kwargs
)

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(
axis, skipna, level, ddof, numeric_only, **kwargs
)

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(
axis, skipna, level, ddof, numeric_only, **kwargs
)

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(
axis, skipna, level, numeric_only, **kwargs
)

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(
axis, skipna, level, numeric_only, **kwargs
)

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(
axis, skipna, level, numeric_only, **kwargs
)

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(
Expand Down

0 comments on commit bed6e52

Please sign in to comment.