-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Description
In [91]: from pandas import DataFrame
In [92]: a = DataFrame([1,2, None, 3, 4])
In [93]: a
Out[93]:
0
0 1
1 2
2 None
3 3
4 4
In [94]: a.apply(lambda x: str(x[0]), axis=1)
Out[94]:
0 1
1 2
2 None
3 3
4 4
In [95]: a.apply(lambda x: int(x[0]), axis=1)
Out[95]:
0 1
1 2
2 NaN
3 NaN
4 NaN
I was expecting elements 3 and 4 to still evaluate properly in this case to something like this:
0 1
1 2
2 NaN
3 3
4 4
i am using windows xp 32 bit with pandas 0.7.1 on python 2.7.2