From 2f6ebcd66329e74b28747acd18492c27555e27a8 Mon Sep 17 00:00:00 2001 From: Richard Shadrach Date: Sat, 7 Oct 2023 10:40:10 -0400 Subject: [PATCH] Add pandas.core.groupby --- pandas/core/groupby/__init__.py | 8 ++++++++ pandas/core/groupby/base.py | 11 +++++++++++ pandas/core/groupby/categorical.py | 11 +++++++++++ pandas/core/groupby/generic.py | 11 +++++++++++ pandas/core/groupby/groupby.py | 11 +++++++++++ pandas/core/groupby/grouper.py | 11 +++++++++++ pandas/core/groupby/indexing.py | 11 +++++++++++ pandas/core/groupby/numba_.py | 11 +++++++++++ pandas/core/groupby/ops.py | 11 +++++++++++ scripts/validate_unwanted_patterns.py | 2 ++ 10 files changed, 98 insertions(+) create mode 100644 pandas/core/groupby/__init__.py create mode 100644 pandas/core/groupby/base.py create mode 100644 pandas/core/groupby/categorical.py create mode 100644 pandas/core/groupby/generic.py create mode 100644 pandas/core/groupby/groupby.py create mode 100644 pandas/core/groupby/grouper.py create mode 100644 pandas/core/groupby/indexing.py create mode 100644 pandas/core/groupby/numba_.py create mode 100644 pandas/core/groupby/ops.py diff --git a/pandas/core/groupby/__init__.py b/pandas/core/groupby/__init__.py new file mode 100644 index 00000000000000..e78e38f4cf9d26 --- /dev/null +++ b/pandas/core/groupby/__init__.py @@ -0,0 +1,8 @@ +from pandas._core import groupby as groupby_ +from pandas.core.common import _depr_core + + +def __getattr__(attr_name): + attr = getattr(groupby_, attr_name) + _depr_core() + return attr diff --git a/pandas/core/groupby/base.py b/pandas/core/groupby/base.py new file mode 100644 index 00000000000000..8def53ba34318a --- /dev/null +++ b/pandas/core/groupby/base.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from pandas._core.groupby import base +from pandas.core.common import _depr_core + +_depr_core() + +_globals = globals() + +for item in base.__dir__(): + _globals[item] = getattr(base, item) diff --git a/pandas/core/groupby/categorical.py b/pandas/core/groupby/categorical.py new file mode 100644 index 00000000000000..431da48b6ea0e7 --- /dev/null +++ b/pandas/core/groupby/categorical.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from pandas._core.groupby import categorical +from pandas.core.common import _depr_core + +_depr_core() + +_globals = globals() + +for item in categorical.__dir__(): + _globals[item] = getattr(categorical, item) diff --git a/pandas/core/groupby/generic.py b/pandas/core/groupby/generic.py new file mode 100644 index 00000000000000..6fc9fa7527ee85 --- /dev/null +++ b/pandas/core/groupby/generic.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from pandas._core.groupby import generic +from pandas.core.common import _depr_core + +_depr_core() + +_globals = globals() + +for item in generic.__dir__(): + _globals[item] = getattr(generic, item) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py new file mode 100644 index 00000000000000..b409cadc12aa3f --- /dev/null +++ b/pandas/core/groupby/groupby.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from pandas._core.groupby import groupby +from pandas.core.common import _depr_core + +_depr_core() + +_globals = globals() + +for item in groupby.__dir__(): + _globals[item] = getattr(groupby, item) diff --git a/pandas/core/groupby/grouper.py b/pandas/core/groupby/grouper.py new file mode 100644 index 00000000000000..715d83fed8239a --- /dev/null +++ b/pandas/core/groupby/grouper.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from pandas._core.groupby import grouper +from pandas.core.common import _depr_core + +_depr_core() + +_globals = globals() + +for item in grouper.__dir__(): + _globals[item] = getattr(grouper, item) diff --git a/pandas/core/groupby/indexing.py b/pandas/core/groupby/indexing.py new file mode 100644 index 00000000000000..a49aea4ff09ab2 --- /dev/null +++ b/pandas/core/groupby/indexing.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from pandas._core.groupby import indexing +from pandas.core.common import _depr_core + +_depr_core() + +_globals = globals() + +for item in indexing.__dir__(): + _globals[item] = getattr(indexing, item) diff --git a/pandas/core/groupby/numba_.py b/pandas/core/groupby/numba_.py new file mode 100644 index 00000000000000..f044f41b074906 --- /dev/null +++ b/pandas/core/groupby/numba_.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from pandas._core.groupby import numba_ +from pandas.core.common import _depr_core + +_depr_core() + +_globals = globals() + +for item in numba_.__dir__(): + _globals[item] = getattr(numba_, item) diff --git a/pandas/core/groupby/ops.py b/pandas/core/groupby/ops.py new file mode 100644 index 00000000000000..e834a1484afbae --- /dev/null +++ b/pandas/core/groupby/ops.py @@ -0,0 +1,11 @@ +from __future__ import annotations + +from pandas._core.groupby import ops +from pandas.core.common import _depr_core + +_depr_core() + +_globals = globals() + +for item in ops.__dir__(): + _globals[item] = getattr(ops, item) diff --git a/scripts/validate_unwanted_patterns.py b/scripts/validate_unwanted_patterns.py index d765d7bc7dcb91..6e1146a4f9f151 100755 --- a/scripts/validate_unwanted_patterns.py +++ b/scripts/validate_unwanted_patterns.py @@ -53,6 +53,8 @@ "_version_meson", # TODO(3.0): GH#55043 - remove upon removal of ArrayManager "_get_option", + # GH#27522 + "_depr_core", }