小编sam*_*sri的帖子

groupby加权平均值和pandas数据帧中的总和

我有一个数据帧,

    Out[78]: 
   contract month year  buys  adjusted_lots    price
0         W     Z    5  Sell             -5   554.85
1         C     Z    5  Sell             -3   424.50
2         C     Z    5  Sell             -2   424.00
3         C     Z    5  Sell             -2   423.75
4         C     Z    5  Sell             -3   423.50
5         C     Z    5  Sell             -2   425.50
6         C     Z    5  Sell             -3   425.25
7         C     Z    5  Sell             -2   426.00
8         C     Z    5  Sell             -2   426.75
9        CC     U    5   Buy              5  3328.00
10       SB …
Run Code Online (Sandbox Code Playgroud)

python r pandas

34
推荐指数
4
解决办法
3万
查看次数

标签 统计

pandas ×1

python ×1

r ×1