python similarity and replace function not work -


i have list of cities bad insertion. tried write function solve problem finding similarity between 2 stings. made first step ratio, did not replace anything:

def similar(a, b):         sequencematcher(none, a, b).ratio()         if sequencematcher>=60:           data_city['city'].replace('a','b',inplace=true)           print 

don't quote variable names.

....replace('a','b', ... 

replaces letter 'a' letter 'b', i.e. apple bpple


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -