Answers for "pandas replace values in column regex"

0

pandas replace values in column regex

# replace the matching strings
df_updated = df.replace(to_replace ='[nN]ew', value = 'New_', regex = True)
  
# Print the updated dataframe
print(df_updated)
Posted by: Guest on April-27-2021

Code answers related to "pandas replace values in column regex"

Python Answers by Framework

Browse Popular Code Answers by Language