首页 > 解决方案 > 错误:没有足够的值来解包(预期 3,得到 1)

问题描述

filename = 'hw_25000.csv'

with open(filename, 'r') as infile:
    data = infile.read().split('\n')

    heights = []
    weights = []
    column = []

for row in data [1:] :
    index, height, weight = row.split(',') 

    height = float(height)
    weight = float(weight)
    index = float (index)

标签: pythonvalueerror

解决方案


推荐阅读