I want to fill a csv column with data from two different lists depending on a certain condition. Here's the code I am using:
for index, row in data.iterrows():
if row['Candle_type'] == 'bullish':
data.at[index, 'upper_shadow'] = bull_upper_shadow
elif row['Candle_type'] == 'bearish':
data.at[index, 'upper_shadow'] = bear_upper_shadow
the error am receiving is -Value Error: Must have equal Len keys and value when setting with an iterable
the column upper shadow should fill with the data from both bull upper shadow and bear upper shadow lists depending on the condition