0

I have this DataFrame:

d = {'col1': ['(-99999.0, -99998.0]', '(-99998.0, 1.0]','(1.0, 10]']}
df = pd.DataFrame(data=d)
print(df)

which looks like this:

                   col1
0  (-99999.0, -99998.0]
1       (-99998.0, 1.0]
2             (1.0, 10]

I need to replace the square bracket ] with a round bracket ), so that the dataframe looks like this:

                   col1
0  (-99999.0, -99998.0)
1       (-99998.0, 1.0)
2             (1.0, 10)

How do I do it?

Giampaolo Levorato
  • 1,055
  • 1
  • 8
  • 22

0 Answers0