Selecting string values from a column and replacing (part of) values in SQL, translated to pandas.

Selecting string values, replacing 'a' with 'b'

In SQL:

SELECT 
  REPLACE(column_1, 'a', 'b') 
FROM 
  table;

In pandas:

table 
    .assign(column_1 = table['column_1'] 
    .apply(lambda column_1: column_1.replace('a', 'b'))) 
    ['column_1']

References