From b3471ff7e921454512381f9c9eb267a2777c04dc Mon Sep 17 00:00:00 2001 From: Anatoly Myachev Date: Tue, 14 May 2024 13:05:05 +0200 Subject: [PATCH] cleanup Signed-off-by: Anatoly Myachev --- .../pandas_on_dask/dataframe/dataframe.py | 2 ++ .../pandas_on_python/dataframe/dataframe.py | 2 ++ .../pandas_on_ray/dataframe/dataframe.py | 2 ++ .../pandas_on_unidist/dataframe/dataframe.py | 2 ++ modin/core/storage_formats/base/query_compiler.py | 12 +++++------- modin/utils.py | 3 --- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/modin/core/execution/dask/implementations/pandas_on_dask/dataframe/dataframe.py b/modin/core/execution/dask/implementations/pandas_on_dask/dataframe/dataframe.py index 0920d963840..5e4598d0ddf 100644 --- a/modin/core/execution/dask/implementations/pandas_on_dask/dataframe/dataframe.py +++ b/modin/core/execution/dask/implementations/pandas_on_dask/dataframe/dataframe.py @@ -38,6 +38,8 @@ class PandasOnDaskDataframe(PandasDataframe): each of the block partitions. Is computed if not provided. dtypes : pandas.Series, optional The data types for the dataframe columns. + pandas_backend : {"pyarrow", None}, optional + Backend used by pandas. None - means default NumPy backend. """ _partition_mgr_cls = PandasOnDaskDataframePartitionManager diff --git a/modin/core/execution/python/implementations/pandas_on_python/dataframe/dataframe.py b/modin/core/execution/python/implementations/pandas_on_python/dataframe/dataframe.py index 6e314beaa9c..0e2bc70d995 100644 --- a/modin/core/execution/python/implementations/pandas_on_python/dataframe/dataframe.py +++ b/modin/core/execution/python/implementations/pandas_on_python/dataframe/dataframe.py @@ -45,6 +45,8 @@ class PandasOnPythonDataframe(PandasDataframe): each of the block partitions. Is computed if not provided. dtypes : pandas.Series, optional The data types for the dataframe columns. + pandas_backend : {"pyarrow", None}, optional + Backend used by pandas. None - means default NumPy backend. """ _partition_mgr_cls = PandasOnPythonDataframePartitionManager diff --git a/modin/core/execution/ray/implementations/pandas_on_ray/dataframe/dataframe.py b/modin/core/execution/ray/implementations/pandas_on_ray/dataframe/dataframe.py index 6838fd9edca..373a84ecdb4 100644 --- a/modin/core/execution/ray/implementations/pandas_on_ray/dataframe/dataframe.py +++ b/modin/core/execution/ray/implementations/pandas_on_ray/dataframe/dataframe.py @@ -39,6 +39,8 @@ class PandasOnRayDataframe(PandasDataframe): each of the block partitions. Is computed if not provided. dtypes : pandas.Series, optional The data types for the dataframe columns. + pandas_backend : {"pyarrow", None}, optional + Backend used by pandas. None - means default NumPy backend. """ _partition_mgr_cls = PandasOnRayDataframePartitionManager diff --git a/modin/core/execution/unidist/implementations/pandas_on_unidist/dataframe/dataframe.py b/modin/core/execution/unidist/implementations/pandas_on_unidist/dataframe/dataframe.py index 3241e9299e8..9adba6bc6dc 100644 --- a/modin/core/execution/unidist/implementations/pandas_on_unidist/dataframe/dataframe.py +++ b/modin/core/execution/unidist/implementations/pandas_on_unidist/dataframe/dataframe.py @@ -38,6 +38,8 @@ class PandasOnUnidistDataframe(PandasDataframe): each of the block partitions. Is computed if not provided. dtypes : pandas.Series, optional The data types for the dataframe columns. + pandas_backend : {"pyarrow", None}, optional + Backend used by pandas. None - means default NumPy backend. """ _partition_mgr_cls = PandasOnUnidistDataframePartitionManager diff --git a/modin/core/storage_formats/base/query_compiler.py b/modin/core/storage_formats/base/query_compiler.py index df21d021b82..25c38929014 100644 --- a/modin/core/storage_formats/base/query_compiler.py +++ b/modin/core/storage_formats/base/query_compiler.py @@ -1118,7 +1118,7 @@ def merge_asof( tolerance=None, allow_exact_matches: bool = True, direction: str = "backward", - ): # noqa: GL08 + ): # Pandas fallbacks for tricky cases: if ( # No idea how this works or why it does what it does; and in fact @@ -3622,9 +3622,7 @@ def groupby_fillna( drop=drop, ) - def groupby_diff( - self, by, axis, groupby_kwargs, agg_args, agg_kwargs, drop=False - ): # noqa: GL08 + def groupby_diff(self, by, axis, groupby_kwargs, agg_args, agg_kwargs, drop=False): return self.groupby_agg( by=by, agg_func="diff", @@ -3637,7 +3635,7 @@ def groupby_diff( def groupby_pct_change( self, by, axis, groupby_kwargs, agg_args, agg_kwargs, drop=False - ): # noqa: GL08 + ): return self.groupby_agg( by=by, agg_func="pct_change", @@ -3945,7 +3943,7 @@ def groupby_ohlc( agg_args, agg_kwargs, is_df, - ): # noqa: GL08 + ): if not is_df: return self.groupby_agg( by=by, @@ -4609,7 +4607,7 @@ def shift( freq, axis, fill_value, - ): # noqa: GL08 + ): return DataFrameDefault.register(pandas.DataFrame.shift)( self, periods, freq, axis, fill_value ) diff --git a/modin/utils.py b/modin/utils.py index ee72620fa7b..a3ed1dc91a3 100644 --- a/modin/utils.py +++ b/modin/utils.py @@ -310,9 +310,6 @@ def _replace_doc( target_doc = target_obj.__doc__ or "" overwrite = overwrite or not target_doc doc = source_doc if overwrite else target_doc - if doc == "": - # Empty docstrings do not need to be inherited - return if parent_cls and not attr_name: if isinstance(target_obj, property):