If the data in the column 'embark_town' is 'Southampton', I want to change them all to 'manchester'. So after accessing the data with condition setting, I applied the 'apply' function. What's the problem?
# Import Packages
import pandas as pd 
import numpy as np
import seaborn as sns
# dataset upload
df = sns.load_dataset("titanic")
df = df.rename(columns={'pclass':'passenger_class','sex':'gender','age':'old'})
def change(name):
  if name == 'Southampton':
    name = 'Manchester'
  return name
condition = (df.embark_town == 'Southampton')
df[condition] = df[condition].apply(change)
df
Get an error:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-7-2cf6d75dce9e> in <module>()
     14 
     15 condition = (df.embark_town == 'Southampton')
---> 16 df[condition] = df[condition].apply(change)
     17 df
     18 # df['embark_town'] = df['embark_town'].apply(change)
5 frames
/usr/local/lib/python3.7/dist-packages/pandas/core/generic.py in __nonzero__(self)
   1328     def __nonzero__(self):
   1329         raise ValueError(
-> 1330             f"The truth value of a {type(self).__name__} is ambiguous. "
   1331             "Use a.empty, a.bool(), a.item(), a.any() or a.all()."
   1332         )
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
 
     
    