Using repr for pandas objects for Python 3 compatibility
@@ -60,7 +60,7 @@ class HashableJSON(json.JSONEncoder):
elif isinstance(obj, np.ndarray):
return obj.tolist()
if pd and isinstance(obj, (pd.Series, pd.DataFrame)):
- return sorted(list(obj.to_dict().items()))
+ return repr(sorted(list(obj.to_dict().items())))
elif isinstance(obj, self.string_hashable):
return str(obj)
elif isinstance(obj, self.repr_hashable):
