Skip to content

Commit

Permalink
Fixed DeprecationWarning in pandas 0.23 (#2699)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored and jlstevens committed May 21, 2018
1 parent 0f5895c commit 8aafda9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions holoviews/core/data/pandas.py
Expand Up @@ -126,8 +126,7 @@ def init(cls, eltype, data, kdims, vdims):
data = [np.array(d) if not isinstance(d, np.ndarray) else d for d in data]
if not cls.expanded(data):
raise ValueError('PandasInterface expects data to be of uniform shape.')
data = pd.DataFrame.from_items([(c, d) for c, d in
zip(columns, data)])
data = pd.DataFrame(dict(zip(columns, data)), columns=columns)
elif isinstance(data, dict) and any(c not in data for c in columns):
raise ValueError('PandasInterface could not find specified dimensions in the data.')
else:
Expand Down

0 comments on commit 8aafda9

Please sign in to comment.