python的dataframe如何进行关系除法?
pandas怎样进行关系除法呢?
import pandas as pdR = {'A':['a','a','a','b','e','e'],
'B':['b','b','b','c','d','d'],
'C':['c','e','d','e','c','e'],
'D':['d','f','e','f','d','f']}
R = pd.DataFrame(R)
print('R',R)
# dataframe的每一列除以series
S = {'C':['c','e'],
'D':['d','f'],
}
S= pd.DataFrame(S)
print('S',S)
#想得到R/S={'A':['a','e'];'B':['b','d']}
以上是 python的dataframe如何进行关系除法? 的全部内容, 来源链接: utcz.com/p/938047.html