0

I´m trying to convert the dtype from a dataframe column which is object to numeric but I cannot do it because it´s showing this ValueError: invalid literal for int() with base 10: '7.775,000'. I've tried with pd.to_numeric and with astype but none of them works. Can you help me please? Here is the line of my code:

join_especies_BYMA['Último Precio'] = join_especies_BYMA['Último Precio'].astype(int)

  • Does this answer your question? [Pandas: convert dtype 'object' to int](https://stackoverflow.com/questions/39173813/pandas-convert-dtype-object-to-int) – oamandawi Apr 12 '21 at 14:09
  • Hi, I've tried with all the methods detailed in the link but no one works. Thanks for your answer. – Agustin Balestra Apr 12 '21 at 14:38
  • Please, edit your question to provide those details. Say what things you have tried from that question, and why they did not work (e.g. what was the error you got when you tried join_especies_BYMA['Último Precio'] = pd.to_numeric(join_especies_BYMA['Último Precio'])). – oamandawi Apr 12 '21 at 15:56

0 Answers0