标签:TE 填充 sub list add head highlight val pytho
headlist = [‘a‘, ‘b‘] datalist = [[1, 2], [0,3], [3,2]] df = pd.DataFrame(data=datalist,columns=headlist) datalist = [[1, 3], [2, 1]] df1 = pd.DataFrame(data = datalist, columns=headlist) # 加 print df.add(df1) # nan用0填充 print df.add(df1, fill_value = 0) # 减 print df.sub(df1) # 乘 print df.mul(df1) # 除 print df.div(df1, fill_value = 1)
标签:TE 填充 sub list add head highlight val pytho
原文地址:https://www.cnblogs.com/chengxin1982/p/9124057.html