1# this will replace "Boston Celtics" with "Omega Warrior"
2df.replace(to_replace ="Boston Celtics",
3 value ="Omega Warrior")
4
1# importing pandas as pd
2import pandas as pd
3
4# Making data frame from the csv file
5df = pd.read_csv("nba.csv")
6
7# this will replace "Boston Celtics" and "Texas" with "Omega Warrior"
8df.replace(to_replace =["Boston Celtics", "Texas"],
9 value ="Omega Warrior")
10