Skip to content

Commit

Permalink
Merge pull request #1412 from ioam/pandas_compat
Browse files Browse the repository at this point in the history
Fixes for pandas 0.20(.1) compatibility
  • Loading branch information
jlstevens authored May 6, 2017
2 parents 53911bf + 94e858e commit dfa9a8c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion holoviews/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

try:
import pandas as pd
Dimension.type_formatters[pd.tslib.Timestamp] = "%Y-%m-%d %H:%M:%S"
Dimension.type_formatters[pd.Timestamp] = "%Y-%m-%d %H:%M:%S"
except:
pass

Expand Down
2 changes: 1 addition & 1 deletion holoviews/core/data/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def select(cls, columns, selection_mask=None, **selection):
if selection_mask is None:
selection_mask = cls.select_mask(columns, selection)
indexed = cls.indexed(columns, selection)
df = df.ix[selection_mask]
df = df.iloc[selection_mask]
if indexed and len(df) == 1 and len(columns.vdims) == 1:
return df[columns.vdims[0].name].iloc[0]
return df
Expand Down
2 changes: 1 addition & 1 deletion holoviews/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

try:
import pandas as pd # noqa (optional import)
datetime_types = datetime_types + (pd.tslib.Timestamp,)
datetime_types = datetime_types + (pd.Timestamp,)
except ImportError:
pd = None

Expand Down

0 comments on commit dfa9a8c

Please sign in to comment.