We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a5b75b commit bd45d39Copy full SHA for bd45d39
pandas/core/frame.py
@@ -837,6 +837,10 @@ def to_dict(self, outtype='dict'):
837
-------
838
result : dict like {column -> {index -> value}}
839
"""
840
+ import warnings
841
+ if not self.columns.is_unique:
842
+ warnings.warn("DataFrame columns are not unique, some "
843
+ "columns will be omitted.",UserWarning)
844
if outtype.lower().startswith('d'):
845
return dict((k, v.to_dict()) for k, v in self.iteritems())
846
elif outtype.lower().startswith('l'):
0 commit comments