From 15969c1beeaae87e49cad224384c1a7751ff7483 Mon Sep 17 00:00:00 2001 From: Adam Greenhall Date: Thu, 18 Dec 2014 16:20:49 -0800 Subject: [PATCH] make DataFrame.to_dict(orient='list') output native python elements --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 7c7872cf7b6a5..6cb64c2a5761e 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -698,7 +698,7 @@ def to_dict(self, orient='dict'): if orient.lower().startswith('d'): return dict((k, v.to_dict()) for k, v in compat.iteritems(self)) elif orient.lower().startswith('l'): - return dict((k, v.tolist()) for k, v in compat.iteritems(self)) + return dict((k, v.values.tolist()) for k, v in compat.iteritems(self)) elif orient.lower().startswith('sp'): return {'index': self.index.tolist(), 'columns': self.columns.tolist(),