I'm new to pandas and I have a question about changing points by commas in Python 2.
The numbers in the csv are presented this way:
As you can see in the image, the floats have different number of decimals.
First I tried to change them from the classic way in Calc and Excel with "search and replace" but this happened:
For the numbers with three decimal places, I did not replace the comma with a period, but I deleted the comma and left it as an integer.
Then try Python with the Pandas library, with these commands:
comas_por_puntos = [float(x.replace(',','.')) for x in bd_df['col_1']] col_1.convert_objects(convert_numeric = True)
col_1 (converted to DataFrame) with
Also try removing a decimal from those who had four, but the result was the same.
When I added a decimal by hand to those of three if it changed well, but it turns out that there are many rows.
What will this be?
It also occurs to me to go through the columns of the DataFrame and add a decimal to those of three but I do not know how to do that ...