Ask coding questions

← Back to all posts
ValueError: invalid literal for int() with base 10: 'HA'
Juice99 (6)

Hi I'm new to programming and I'm trying to make a solitaire game but it keeps coming up with this error message:

The show() function is intended to replace the runs data frame with cards on the hid_runs data frame if there is no card below it.

I'm not looking for ways to improve my code or make it more efficient as this is just a personal project to help me learn.

Any relevant help will be greatly appreciated!
Thanks!

Commentshotnewtop
MrEconomical (2225)

you can't convert 'HA ' to an int

Juice99 (6)

@MrEconomical I thought that was what the error meant however I wasn't trying to do that.

That part of the code is meant to iterate through the data frame and check if the cell below it is empty and if it is replaces the cell in runsDF with the corresponding one in the hid_runsDF.