Message from Python discussions

November 2018

— Does DataFrame.replace() allow to replace the whole column?


Ok. Let's try it another way. How to clean the csv file of strings which contain whitespaces all at once? I mean without using loops since it slows down the process dramatically. I have got enormous csv's

— Did you try
chunk['Кол-во'] = pd.core.series.Series([np.float64(x.strip().replace(',','.')) for x in chunk['Кол-во']])

Message permanent page

— Yes

— I did

— I thought of it

— It didn't help

— So do you think it has something to do with incompatibility of types?

— I think you can't do that without loops

— Really?

— How do u even suppose to do it without loops?

— Magic?