Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Mejor haz una función así:
- prueba = pd.DataFrame({'index':['1','2','3'],
- 'col_1': [0,2,3],
- 'col_2':[1,4,5]})
- def clean_s(x, values, output):
- if x in values:
- return output
- return x
- prueba["col_1"] = prueba["col_1"].apply(lambda x: data_cleaner(x, [0], 777)
- prueba["col_2"] = prueba["col_2"].apply(lambda x: data_cleaner(x, [5], 999)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement