2
我有完全相同的索引兩個數據幀:的Python,熊貓:從另一個DF通過相同指數值在一個DF替換值
the first one:
0 1 2
2 0.011765 0.490196 0.015686
2 0.011765 0.490196 0.015686
2 0.007843 0.494118 0.007843
2 0.007843 0.494118 0.007843
2 0.007843 0.501961 0.011765
.. ... ... ...
0 0.000000 0.031373 0.039216
0 0.031373 0.082353 0.105882
0 0.094118 0.149020 0.192157
0 0.094118 0.156863 0.215686
[337962 rows x 3 columns]
,第二個:
0 1 2
0 0.055852 0.118138 0.052386
1 0.453661 0.665857 0.441551
2 0.096394 0.635641 0.068524
3 0.952545 0.827438 0.047632
4 0.787729 0.823494 0.795792
5 0.050284 0.549379 0.592593
6 0.608805 0.215458 0.068293
7 0.775640 0.091352 0.689224
第一個DF非常龐大。我需要儘可能快地用小DF中具有相同索引的值替換巨大DF中的值。 如何? 感謝您的幫助。
很酷!謝謝! –