0
Hello, I’m trying to remove a character from a base that I extracted from a TXT file, I loaded the file with pandas but I can’t remove it using replace command, below the values I have in a certain column.
0 [23/Mar/2021:00:00:00
1 [23/Mar/2021:00:00:00
2 [23/Mar/2021:00:00:00
3 [23/Mar/2021:00:00:00
4 [23/Mar/2021:00:00:00
I am using the following code to remove "[" with the following command:
y[3]replace("[","")
0 [23/Mar/2021:00:00:00
1 [23/Mar/2021:00:00:00
2 [23/Mar/2021:00:00:00
3 [23/Mar/2021:00:00:00
4 [23/Mar/2021:00:00:00
Name: 3, dtype: object
by what I understand it is not removing the character because the field type is as object, I need to do this for other columns of my file however I am bumping in this conversion, already tried the command below to change the column to string however unsuccessfully:
y[3] = y[3].astype(str)
y[3]
Name: 3, dtype: object
you can provide the data or make an MWE?
– Lucas