_tkinter.TclError: bad screen distance when using values of columns for coordinates from a row in pandas

Viewed 115

I have got this row using desired_row = data[data.state==answer]

   state    x   y
34  Ohio  176  52

and when I do turtle.goto((desired_row.x),(desired_row.y)) statement I am getting error of bad screen distance. What is wrong here?

1 Answers

Values of state , x and y all are of string type. You can simply convert values of x and y into integer to use them as coordinates. Something like this

turtle.goto(int(desired_row.x),int(desired_row.y))
Related