The next task is the column not Provided . So, I need to transform this sign into the type of replace for example at 0.00? This is the main question) I tried to write functions, nothing helps. I understand that the task is quite easy, but I will trample on one revenge on 3 hours. float64 .
I do the following:
and I come out a mistake:
for obvious absolutely reasons) type of sign
the question is how to me in the sign
question@mail.ru
·
01.01.1970 03:00
Python Pandas. Replace in the column some values with others
answer@mail.ru
·
01.01.1970 03:00
Try using the method to replace 'not provideDed' with
in [ 1 ]: import pandas as pdin [ 3 ]: import numpy as npin [ 5 ]: df = pd.dataframe ([ 0.1 , 5.0 , 'Not Provided' ], [ 'not Provided' , 0.2 3.3 ]]) in [ 6 ]: dfout [ 6 ]: 0 1 2 0 0.1 5.0 not provideD 1 not Provided 0.2 3.3 in [ 7 ]: df.dtypesout [ 7 ]: 0 Object 1 float64 2 object in [ 8 ]: result = df.Replace ( '' '"not personized' , np.nan) in [ 9 ]: resultronout [ 9 ]: 0 1 2 0 0.1 5.0 nan 1 nan 0.2 3.3 in [ 10 ]: result.dtypesout [ 10 ]: 0 float64 1 float64 2 float64dtype: object