Pandas SettingWithCopyWarning [duplicate]
The issue here is that: df.col1[df.col1 == 10]
returns a copy.
So I would say:
row_index = df.col1 == 10
# then with the form .loc[row_indexer,col_indexer]
df.loc[row_index, 'col1'] = 100
Agreed with Paul about 'loc' usage.
For your applymap case you should be able to do this:
cols = ['col1', 'col2', 'col3']
df.loc[:, cols] = df[cols].applymap(some_function)