I have a DataFrame of type: pandas.core.frame.DataFrame, imported from CSV file which has a column with links having elements as shown below
| sno | link |
|---|---|
| A | C:\Users\Documents\SQL\Python Codes\ |
| B | D:/Users/Documents\Pendrive\Example/ |
| C | D:/Users\Documents/Pendrive/Example\ |
| D | D:/Users\Documents/Pendrive/Example |
I am trying to export this data in CSV and load in MySQL.
There's a mix of front and back slash in my links. Currently the rows with backslash - '\' present at the end, i.e., Row 'A' and 'C' are creating issue while importing in SQL. Row 'B' and 'D' has no problem.
I am performing my pre-process in Python where I am trying to eradicate this error.
How can I replace all the '\' with '/' in my entire DataFrame.