wesm/pandas — Issue #450: object dtype  Series are converted to all NaNs when added to DataFrames
Author: cswegger
Created: 2011-12-06 11:25:27+00:00
State: open

Case in point:

````python

>>> df
RP/Rsum P.value
ID
A_23_P42353 17.8 0
A_23_P369994 15.91 0
A_33_P3262440 436.7 0.0005
A_32_P199429 18.97 0
A_23_P256724 22.24 0
A_33_P3394689 24.24 0
A_33_P3403117 27.14 0
A_24_P252364 28.56 0
A_23_P99515 31.82 0
A_24_P261750 31.46 0

>>> df.dtypes
RP/Rsum float64
P.value float64

>>> ids = pandas.Series(['51513', '9201', np.nan, np.nan, '8794', '6530', '7025', '4897', '84935', '11081'])
>>> df["test"] = ids
>>> df
RP/Rsum P.value test
ID
A_23_P42353 17.8 0 NaN
A_23_P369994 15.91 0 NaN
A_33_P3262440 436.7 0.0005 NaN
A_32_P199429 18.97 0 NaN
A_23_P256724 22.24 0 NaN
A_33_P3394689 24.24 0 NaN
A_33_P3403117 27.14 0 NaN
A_24_P252364 28.56 0 NaN
A_23_P99515 31.82 0 NaN
A_24_P261750 31.46 0 NaN
>>> df.dtypes
RP/Rsum float64
P.value float64
test object
````
This also happens with float objects and the like. I am not sure in what the trigger is.