The answer is,
df['A'] = df['A'].map(addOne)
from : https://stackoverflow.com/questions/36213383/pandas-dataframe-how-to-apply-function-to-a-specific-column
No comments:
Post a Comment