简体   繁体   中英

what this error means : ValueError: Must have equal len keys and value when setting with an iterable

I created a new column as : df['columnName'] = dict({1:'value'})

when I was assigning a dict to a cell in above created column through a function , I am getting, ValueError: Must have equal len keys and value when setting with an iterable

I want to know why this is happening and what this error means.

这个问题之前已经回答过,您可以在这里找到解决方案: 使用可迭代设置时必须具有相等的 len 键和值

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM