state、x和y的值都是字符串类型。您可以简单地将x和y的值转换为整数,将它们用作坐标。像这样的
我使用desired_row = data[data.state==answer]
得到了这一行
state x y
34 Ohio 176 52
当我做turtle.goto((desired_row.x),(desired_row.y))
语句时我得到错误的屏幕距离。这里怎么了?
turtle.goto(int(desired_row.x),int(desired_row.y))