I'm using dict(zip(df... to create a dictionary and I get the error below. I've used it exactly in the same way on a different file and it's working fine so not sure why I'm getting this error in here.
To read the mapping file:
df_Mapping = pd.read_excel(r"Z:\Source_Data\Concur_Mapping.xlsx")
To create the dictionary:
dict(zip(df_Mapping.Claim Sub-Type, df_Mapping.Mapping))
Error:
Cell In[71], line 1
dict(zip(df_mapping.Claim Sub-Type, df_mapping.Mapping))
^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
I was expecting to create a dictionary to replace values in another dataframe