I am simply trying to build a dictionary with keys from a list of strings and values that area list of numbers.
filepath = path
df = pd.read_excel(filepath, sheet_name=sheet)
columns = df.columns
fields = columns.to_list()
values = [1,2,3]
dict = {}
def build_dict(fields,values):
for i in fields:
dict[i] = fields[i]
print(dict)
build_dict(fields,values)
I consistently end up with... TypeError: list indices must be integers or slices, not str