replace cell pandas
df.loc[row_or_index, column_name] = value
replace cell pandas
df.loc[row_or_index, column_name] = value
pandas replace data in specific columns with specific values
### replace one value ###
df["column"].replace("US","UK") # you can also use numerical values
### replace more than one value ###
df["column"].replace(["man","woman","child"],[1,2,3]) # you can also use numerical values
# man ==> 1
# woman ==> 2
# child ==> 3
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us