Skip to content

Commit

Permalink
DOC fix incorrect example in DataFrame.to_dict docstring. Close GH198…
Browse files Browse the repository at this point in the history
  • Loading branch information
Anh Le authored and harisbal committed Feb 28, 2018
1 parent 69f0e8b commit 25fc828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,8 +958,8 @@ def to_dict(self, orient='dict', into=dict):
{'col1': [1, 2], 'col2': [0.5, 0.75]}, index=['a', 'b'])
>>> df
col1 col2
a 1 0.1
b 2 0.2
a 1 0.50
b 2 0.75
>>> df.to_dict()
{'col1': {'a': 1, 'b': 2}, 'col2': {'a': 0.5, 'b': 0.75}}
Expand Down

0 comments on commit 25fc828

Please sign in to comment.