Reputation: 233
I am trying to replace '?' with "'" but the question mark still remains. I am using below code to replace
df['Indication'] = df['Indication'].replace('?', '’')
The resulting column is given below:
Hodgkin?s Lymphoma at high risk of relapse or progression post-ASCT
But the output I want is the following:
Hodgkin's Lymphoma at high risk of relapse or progression post-ASCT
Upvotes: 1
Views: 45
Reputation: 195408
Use .str.replace
:
df["Indication"] = df["Indication"].str.replace("?", "'", regex=False)
print(df)
Prints:
Indication
0 Hodgkin's Lymphoma at high risk of relapse or ...
Upvotes: 1