Skip to content

Tag: pandas

How to ignore NAN turning to String when using df.applymap(str)

I have to turn all the items in dataframe into string and i have tried as below, but it turns nan to string. How can i avoid nan to string here? i tried as below, but not working. Edit i tried df.applymap(str) but some reason i am getting boolean value of NA is ambiguous with my dataframe so i am

Trouble using index on a list

I am trying to scrape odds from multiple sites but obviously, some sites use different names for different teams. To still be able to handle my data efficiently I want to change my scraped data (team names in this case). I have an excel file with all the team names per site for the premier league and one colu…