Skip to content

Commit

Permalink
Merge fd4c653 into 574a809
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Oct 17, 2017
2 parents 574a809 + fd4c653 commit a5a053d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions holoviews/core/util.py
Expand Up @@ -10,6 +10,7 @@
from collections import defaultdict
from functools import partial
from contextlib import contextmanager
from distutils.version import LooseVersion

from threading import Thread, Event
import numpy as np
Expand All @@ -30,8 +31,12 @@
datetime_types = (np.datetime64, dt.datetime)

try:
import pandas as pd # noqa (optional import)
datetime_types = datetime_types + (pd.Timestamp,)
import pandas as pd
if LooseVersion(pd.__version__) > '0.20.0':
from pandas.core.dtypes.dtypes import DatetimeTZDtypeType
else:
from pandas.types.dtypes import DatetimeTZDtypeType
datetime_types = datetime_types + (pd.Timestamp, DatetimeTZDtypeType)
except ImportError:
pd = None

Expand Down

0 comments on commit a5a053d

Please sign in to comment.