1

I have a dataframe like this:

number    file
  1       "[file1,file2]"
  2       [file1]
  3       "[file3,file4]

I want to delete the ". This is what I've tried:

 data = df.replace([\"], '', regex=True)

But, nothing changes in my dataframe. How do I solve this problem?

Thank you.

petezurich
  • 9,280
  • 9
  • 43
  • 57
elisa
  • 489
  • 5
  • 13

1 Answers1

5
import pandas as pd
df = pd.read_csv("test.csv",delimiter=',')
data = df.replace('"', '', regex=True)
print(data)

enter image description here

Mobasshir Bhuiya
  • 954
  • 6
  • 20