New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select_dtypes and get_dummies break on duplicate dolumns #20848

kunalgosar opened this Issue Apr 27, 2018 · 0 comments


None yet
2 participants

kunalgosar commented Apr 27, 2018

Functions select_dtypes and get_dummies have strange and incorrect behavior on duplicate column names. Shown below:

In [6]: df
  col1 col1
0    1    a
1    2    b

In [7]: df.select_dtypes(include=['int'])
Empty DataFrame
Columns: []
Index: [0, 1]

In [8]: pd.get_dummies(df)
   col1_('c', 'o', 'l', '1')  col1_('c', 'o', 'l', '1')
0                          1                          1
1                          1                          1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment