Good afternoon Mauricio, all right?
I think if the pandas are identifying '/' as a character, you can use the 'apply' function.
novodf = antigodf.apply(lambda x: x.replace('/','0'))
In this way you would replace '/' with '0'
If you want to replace '/' with a value of NaN, to use functions related to null numbers of pandas, import the numpy library and replace the '0' of apply with np.nan, thus:
import numpy as np
novodf = antigodf.apply(lambda x: x.replace('/',np.nan))
If you want to replace NaN, you can use the fillna()
function by passing the value that will replace NaN
novodf.fillna(0)
This command would replace the NaN values by 0.
Follows a link from Paulo Vasconcellos's website with great pandas and data science tips: PauloVasconcellos
I hope I have helped.
Thank you.
Claudio.