I have been trying to use a Pandas Dataframe in Python 3 to find a specific id matching a name from a CSV file. The API I am reading from gives me the name António, along with other names, the way I need it to with the accent in a column called "first". I have an array of names that won't necessarily have all of the accents I need to match. This program seems to work for every name I try except for the ones that have different values for accented characters.
import pandas as pd
nameArray=[Antonio,Matt,Mark,Raul]
playersUrl = 'https://www.FakeSite.com/players'
playerData = pd.read_csv(playersUrl, names=["PLAYERID", "FIRSTNAME"]
for first, playerid in zip(playerData["FIRSTNAME"],playerData["PLAYERID"]):
for i in len(nameArray):
testName = nameArray[i]
if first == testName:
return playerid