Pandas > Apply function to dataframe (map/lambda)

Name
Code
Output
dataframe = pandas.DataFrame(numpy.random.randint(0,100,size=(5, 2)), columns=['C1','C2'])
print ("dataframe")
print (dataframe)
# cross-tabulation of two factors (default is a frequency table) 
dataframe['C1'] = dataframe['C1'].map(lambda x: x-100)
print ("modified dataframe")
print (dataframe)
dataframe
   C1  C2
0  27  35
1  46  38
2  21  98
3  34  30
4  76   8
modified dataframe
   C1  C2
0 -73  35
1 -54  38
2 -79  98
3 -66  30
4 -24   8