When I execute this code:
import pandas as pd
# Example DataFrame creation
df = pd.DataFrame({'A': [1, 2, 3]}, index=[0, 1, 2])
# Assuming idx is a valid index in df, for example:
idx = 1
# Store the list as a single value in the DataFrame
df.loc[idx, 'SHAP'] = [1, 2]
print(df)
I get the error: ValueError: Must have equal len keys and value when setting with an iterable how do I fix this? I am using pandas version 2.1.4