One - One Code All

Blog Content

pandas乘法DataFrame.multiply()

Python 统计学-科学计算   2013-07-09 23:22:52

pandas中,dataframe乘法。

>>> pd.DataFrame({'A':[1, 2, 3]})
   A
0  1
1  2
2  3
>>> a = pd.DataFrame({'A':[1, 2, 3]})
>>> a.multiply(2)
   A
0  2
1  4
2  6



上一篇:python时间序列pandas计算涨跌幅
下一篇:中位数、众数和均值的关系

The minute you think of giving up, think of the reason why you held on so long.