0

I have the following data frame:

DATE

16.12.2022

15.12.2022

14.12.2022

13.12.2022

12.12.2022

I want to replace the "." in my DATE column with "-"

The current code I was using is as follows:

df2['DATE'] = df2['DATE'].replace('.','-')

But this would provide the following output:

0       ----------
1       ----------
2       ----------
3       ----------
4       ----------

All of the text in date has been replaced with "-"

Any suggestions as how I can make this work?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
KChemist
  • 11
  • 2

0 Answers0