I have a dataframe (in Python 2.7, pandas 0.15.0):
df= A B C 0 NaN 11 NaN 1 two NaN [\'foo\', \'bar\'] 2 three 3
I had a column contained lists and NaNs. So, the next one worked for me.
NaN
df.C.map(lambda x: my_func(x) if type(x) == list else x)