Skip to content

Tag: pandas

Read a TSV file from a remote server

I have this function which returns the path to the file I need to read Later on, I am trying to open the file db_file holds one of the paths above. When I execute the script I get this error: I have checked the files names and the paths they all exist and in the right location. I have tried

Removing a char from a pandas dataframe column with for loop

I have a DF that has a country column and some of that countries has “(” in it. I tried to remove all of that “(” s with this for loop: But when I print that DF again, I see all parenthesis did not removed. I’d be happy if someone say where I made a mistake. Thanks. Answer You do…

Error converting string to date field in Pandas

As you can infer from the above , When I try to convert the string , it gives error. Tried below codes but got same error as,day is not defined, As SO memeber suggested,I edited code but index stills the string, did not convert to day Answer If you don’t want to create another column, then just this wil…