43 lines
1.8 KiB
Diff
43 lines
1.8 KiB
Diff
|
From f22f9ed3bb224df538f438aa365dce3616e5cd50 Mon Sep 17 00:00:00 2001
|
||
|
From: toddrme2178 <toddrme2178@gmail.com>
|
||
|
Date: Thu, 17 May 2018 15:33:25 -0400
|
||
|
Subject: [PATCH] Support pandas 0.23.0 `core.groupby` module layout
|
||
|
|
||
|
`pandas.core.groupby` has been moved to `pandas.core.groupby.groupby` for pandas 0.23.0. See pandas pull request [#20506](https://github.com/pandas-dev/pandas/pull/20506).
|
||
|
---
|
||
|
tqdm/_tqdm.py | 15 +++++++++++----
|
||
|
1 file changed, 11 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/tqdm/_tqdm.py b/tqdm/_tqdm.py
|
||
|
index ff551c97..749d9928 100755
|
||
|
--- a/tqdm/_tqdm.py
|
||
|
+++ b/tqdm/_tqdm.py
|
||
|
@@ -539,16 +539,23 @@ def pandas(tclass, *targs, **tkwargs):
|
||
|
"""
|
||
|
from pandas.core.frame import DataFrame
|
||
|
from pandas.core.series import Series
|
||
|
- from pandas.core.groupby import DataFrameGroupBy
|
||
|
- from pandas.core.groupby import SeriesGroupBy
|
||
|
- from pandas.core.groupby import GroupBy
|
||
|
- from pandas.core.groupby import PanelGroupBy
|
||
|
from pandas import Panel
|
||
|
try:
|
||
|
# pandas>=0.18.0
|
||
|
from pandas.core.window import _Rolling_and_Expanding
|
||
|
except ImportError: # pragma: no cover
|
||
|
_Rolling_and_Expanding = None
|
||
|
+ try:
|
||
|
+ # pandas>=0.23.0
|
||
|
+ from pandas.core.groupby.groupby import DataFrameGroupBy
|
||
|
+ from pandas.core.groupby.groupby import SeriesGroupBy
|
||
|
+ from pandas.core.groupby.groupby import GroupBy
|
||
|
+ from pandas.core.groupby.groupby import PanelGroupBy
|
||
|
+ except ImportError:
|
||
|
+ from pandas.core.groupby import DataFrameGroupBy
|
||
|
+ from pandas.core.groupby import SeriesGroupBy
|
||
|
+ from pandas.core.groupby import GroupBy
|
||
|
+ from pandas.core.groupby import PanelGroupBy
|
||
|
|
||
|
deprecated_t = [tkwargs.pop('deprecated_t', None)]
|
||
|
|