You need to add an "r" to make a raw string so the backslashes will be interpreted correctly
food['GPA'] = food['GPA'].astype(str).str.extract(r'(\d*\.\d+|\d+)', expand=False)
food['GPA'] = pd.to_numeric(food['GPA'], errors='coerce')
print(food['GPA'].unique())