potential future pandas fix

- related to #824
This commit is contained in:
Casper da Costa-Luis 2019-10-29 12:27:29 +00:00
parent 84102ab0ce
commit 59f457a8ce
No known key found for this signature in database
GPG Key ID: 986B408043AE090D
1 changed files with 6 additions and 2 deletions

View File

@ -645,7 +645,10 @@ class tqdm(Comparable):
"""
from pandas.core.frame import DataFrame
from pandas.core.series import Series
from pandas import Panel
try:
from pandas import Panel
except Import Error: # TODO: pandas>0.25.2
Panel = None
try: # pandas>=0.18.0
from pandas.core.window import _Rolling_and_Expanding
except ImportError: # pragma: no cover
@ -752,7 +755,8 @@ class tqdm(Comparable):
DataFrameGroupBy.progress_apply = inner_generator()
DataFrame.progress_applymap = inner_generator('applymap')
Panel.progress_apply = inner_generator()
if Panel is not None:
Panel.progress_apply = inner_generator()
if PanelGroupBy is not None:
PanelGroupBy.progress_apply = inner_generator()