LoginSignup
0
0

More than 3 years have passed since last update.

【Python】ValueError: arrays must all be same length

Last updated at Posted at 2020-07-30

Python3でスクレイピングをしていたら、ValueError: arrays must all be same lengthのエラーが出た

原因

ValueError: arrays must all be same lengthは、抽出したリストの長さが、違ったらこのエラーが出るらしい

dt={'key1': [1,2,3], 'key2': [1,2,3,4], 'key3': [1,2]}

対策

リストの長さを揃える

dt={'key1': [1,2,3], 'key2': [1,2,3], 'key3': [1,2,3]}

参考
https://qiita.com/ShoheiKojima/items/30ee0925472b7b3e5d5c

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0