#Create list to store all not null URL values
URL_vals = []
# Create List of Just URL Columns
URL_col = df[['Graphic URL 2','Graphic URL 3','Graphic URL 4','Fact Sheet URL','Fact Sheet URL 2','Fact Sheet URL 3','Fact Sheet URL 4',
'Fact Sheet URL 5','Fact Sheet URL 6','Fact Sheet URL 7','Fact Sheet URL 8','Stats for Stories URL','Stats for Stories URL 2',
'Stats for Stories URL 3','Stats for Stories URL 4','Stats for Stories URL 5','Stats for Stories URL 6',
'Stats for Stories URL 7','Stats for Stories URL 8','Facebook Content URL','Instagram Content URL','Twitter Content URL',
'News Product URL','Press Release URL','Press Release URL 2','Press Release URL 3','Press Release URL 4',
'Press Release URL 5','Press Release URL 6','Press Release URL 7','Press Release URL 8','America Count URL','America Counts URL 2',
'America Counts URL 3','America Counts URL 4','America Counts URL 5','America Counts URL 6','America Counts URL 7','America Counts URL 8',
'Census Blog URL','Census Blog URL 2','Census Blog URL 3','Census Blog URL 4','Census Blog URL 5','Census Blog URL 6',
'Census Blog URL 7','Census Blog URL 8','Graphic URL']]
# Loop through rows and grab string values that are not null. Append them to the URL_vals list
for i in URL_col.iterrows():
if np.string_(i):
URL_vals.append(i)
++i
I am getting this error in response: ValueError: setting an array element with a sequence.
How can I fix this?