Closed
Description
Code Sample, a copy-pastable example if possible
In [4]: df = pd.DataFrame([[1,2,3]], columns=['a', 'a', 'b'])
In [5]: df
Out[5]:
a a b
0 1 2 3
In [6]: df.to_dict()
C:\<snip>\pandas\core\frame.py:891:
UserWarning: DataFrame columns are not unique, some columns will be omitted.
"columns will be omitted.", UserWarning)
Out[6]: {'a': {0: 2}, 'b': {0: 3}}
Problem description
warning should specific stacklevel to warn at calling site, xref #9584