Forum Discussion
Anonymous
5 years agoNot applicable
Power BI - How to use Python script to do a search and replace
Hi, I would like to use a Python script to do an automatic Search and Replace just like we can do with Excel. In the following example, I would like to replace all the X by Y, I used the following...
Anonymous
2 years agoNot applicable
Hi there, im facing the same issue when i wanna make my automation data cleaning and after attempting so many code i think this one is gonna work on you too... here's the code
column_name = 'YourColumnName'
replacement_value = 'NewValue'
dataset[column_name].replace({'OldValue': replacement_value}, inplace=True)