I reproduced the exact code on Jupyter after downloading the dataset artworks as follows (Based on Python for DataScience Intermediate):
for row in moma: # remove parentheses from the nationality column nationality = row nationality = nationality.replace("(","") nationality = nationality.replace(")","") row = nationality
Unfortunately on DQ it sees no mistake appear but on Jupyter, I have the following error:
TypeError: ‘str’ object does not support item assignment
What should I do? Transform the string into a numeric string?