applymap函数
import numpy as np
import pandas as pd
from pandas import DataFrame
columns = ['a1','a2','a3','a4']
index = ['b1','b2','b3']
data = np.random.randint(0,100,size=(3,4))
df = DataFrame(columns=columns, index=index, data=data)
df
# 所有的值 +2
df.applymap(lambda x:x+2) # 可以传一个普通函数