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:
- ERROR 1406 (22001): Data Too Long, field len 30, data len 48
- The difference between single equal sign and double equal sign EQ in shell script
- Vue console reports an error duplicate keys detected: ‘XXXX’. This may cause an update error. Solution
- Vue warn: duplicate keys detected: ‘1’. This may cause an update error
- [Vue warn]: Duplicate keys detected: ‘‘. This may cause an update error.
- new_lrs[:5] = lr_warm [12] TypeError: can only assign an iterable
- TypeError: ‘numpy.int64′ object is not iterable ,’int’ object is not iterable
- Duplicate keys detected: ‘***‘. This may cause an update error
- Duplicate keys detected: ‘XXXX’. This may cause an update error. Solution
- Python 3 error typeerror: ‘dict’_ keys‘ object is not subscriptable
- TypeError: object of type ‘Cursor‘ has no len()
- Typeerror: object of type ‘response’ has no len() why?
- [depth concept] · introduction of EER (equal error rate)
- TypeError: object of type ‘builtin_function_or_method’ has no len()
- Invalid attempt to spread non-iterable instance
- TypeError: ‘int’ object is not iterable
- How to get all the keys of map by golang
- An import error is reported in the python. The solution to setting. Pylintrc is invalid
- react Error: Objects are not valid as a React child (found: object with keys {username, password})
- Apache [error] server reached MaxClients setting, consider raising the MaxClients setting