Изучив документацию по refextract здесь , я обнаружил, что ваша переменная references
является словарем. Для преобразования такого словаря в python вы можете использовать Pandas следующим образом:
import pandas as pd
# create a pandas dataframe using a dictionary
df = pd.DataFrame(data=references, index=[0])
# Take transpose of the dataframe
df = (df.T)
# write the dictionary to an excel file
df.to_excel('extracted_references.xlsx')