Skip to content

Commit

Permalink
Minor optimization for pandas hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Oct 20, 2017
1 parent 8f91313 commit ac7297f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion holoviews/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def default(self, obj):
elif isinstance(obj, np.ndarray):
return obj.tolist()
if pd and isinstance(obj, (pd.Series, pd.DataFrame)):
return repr(sorted(list(obj.to_dict().items())))
return obj.to_csv().encode('utf-8')
elif isinstance(obj, self.string_hashable):
return str(obj)
elif isinstance(obj, self.repr_hashable):
Expand Down

0 comments on commit ac7297f

Please sign in to comment.