November 2018
— 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
Message permanent page
Did you trychunk['Кол-во'] = pd.core.series.Series([np.float64(x.strip().replace(',','.')) for x in chunk['Кол-во']])?
chunk['Кол-во'] = pd.core.series.Series([np.float64(x.strip().replace(',','.')) for x in chunk['Кол-во']])
— 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?
— So there are cells but some of them contains only whitespaces and you want to clear them?