相除的条件:列名的类型和名称要一致
# dataframe df
data = {'name':['cun1','cun2','cun3'],
'hah':[1,2,2],
'数量':[3,2,5],
'价格':[10,9,8]}
df = pd.DataFrame(data)
print(df)
# dataframe df1
data1 = {'name':['cun1','cun2','cun3'],
'hah':[1,2,2],
'数量':[3,2,5],
'价格':[10,9,8]}
df1 = pd.DataFrame(data1)
print(df1)
aa = df.iloc[:,1:].div(df1.iloc[:,1:],axis=0)
aa