You can use the add() function of Pandas DataFrame to add any value to all elements of a DataFrame.
Here is an example:
>>> import pandas as pd>>> df = pd.DataFrame({'a':[10,20,30], 'b':[11,22,33], 'c':[12,24,36]})>>> df a b c0 10 11 121 20 22 242 30 33 36>>> df.add(5) a b c0 15 16 171 25 27 292 35 38 41>>>
You can also add the number directly to the DataFrame.
Example:
>>> df+5 a b c0 15 16 171 25 27 292 35 38 41