0

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
  • 7,683
  • 8
  • 34
  • 51
elisa
  • 479
  • 3
  • 12

1 Answers1

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

enter image description here

Mobasshir Bhuiya
  • 778
  • 5
  • 19