Pandas > Replace values

Name
Code
Output
dataframe = pandas.DataFrame(numpy.random.randint(0,5,size=(5, 3)), columns=['C1','C2','C3'])
print ("dataframe")
print (dataframe)
dataframe2 = dataframe.replace(1,-100)
print ("aggregated data")
print (dataframe2)
dataframe
   C1  C2  C3
0   3   1   3
1   1   3   4
2   4   1   0
3   4   0   3
4   4   0   2
aggregated data
    C1   C2  C3
0    3 -100   3
1 -100    3   4
2    4 -100   0
3    4    0   3
4    4    0   2