df.applymap duplicates data with frame has dupe columns #2786

Closed
vincentarelbundock opened this Issue Jan 31, 2013 · 4 comments

Comments

Projects
None yet
2 participants
Contributor

vincentarelbundock commented Jan 31, 2013

Using pandas master/github. In this example, we get 4 times the same column after applying an element-wise operation:

In [1]: import numpy as np
In [2]: import pandas as pd
In [3]: df = pd.DataFrame(np.random.random((3,4)))
In [4]: cols = pd.Index(['a','a','a','a'])
In [5]: df.columns = cols
In [6]: df.applymap(str)
Out[6]: 
                a               a               a               a
0  0.320051885413  0.320051885413  0.320051885413  0.320051885413
1  0.967238549103  0.967238549103  0.967238549103  0.967238549103
2  0.913201809648  0.913201809648  0.913201809648  0.913201809648
Contributor

y-p commented Mar 31, 2013

disabled applymap for frames with dupe columns until this gets fixed proper.
7916e76

Contributor

y-p commented Apr 1, 2013

moved to #3230, raising an error will do for 0.11.
Updated RELEASE.rst

y-p closed this Apr 1, 2013

Contributor

y-p commented May 3, 2013

FYI, Fixed (rather then merely prevented) by #3509.

Contributor

vincentarelbundock commented May 3, 2013

thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment