1

I want to replace all values in a certain column,

for example this is my dataframe

Label  A  B C
 1     2  3 4
 2     3  2 1
 4     4  4 4

I want to replace all values in Column C with another value, for example "NaN"

To do this, do I need to use something like .ix or .iloc ?

I tried this rem = df.ix[df.C!='NaN'] = 'NaN' , but it just returned a string "NaN"

Cœur
  • 37,241
  • 25
  • 195
  • 267
gbhrea
  • 494
  • 1
  • 9
  • 22

0 Answers0