Skip to content

how to fix python pandas encoding issue?

I import csv table into JUPYTER NOTEBOOK, and something wrong is happening when I try to iloc a video views column (К-ть переглядів). I need to format this cell to INT type (using .astype()), but it tells me that there is an error: ValueError: invalid literal for int() with base 10: ‘380xa0891xa0555&#82…

Turning a list into a dictionary adding headers

I’d like to turn the following list in a dictionary: I’d like to add the following headers. Each element of the list needs to have its own header. This is my code: And the following is my output. I obtain the dictionary only for the first element of the list and I can’t understand why. Answe…

Wanting to input bowling scores, total, average them

Need for a user to input bowling scores and store them, to be totaled and averaged later and they can press “q” or “Q” to quit and total/average them. I’ve tried fumbling around figuring out loops but not sure how to deal with inputting integers and also accepting “Q”…