Must have equal len keys and value when setting with an Iterable

Error type

When writing the crawler program, the following prompt appears:

Must have equal len keys and value when setting with an iterable

The types of data read are as follows:

Error code:

df.loc[m,'geo']=s['geo']

reason

The reason is that the object crawled is a list, and the key values on the left and right sides are not equal, so an error message appears!

modify

if s['geo']!=None:
    df.loc[m,'geo']=str(s['geo']['coordinates'][1])+','+str(s['geo']['coordinates'][0])
else:
    df.loc[m,'geo']=''

The problem was solved successfully after modification

 

Read More: