1
有2個dataframes,是否可以使用DataFrame.mul()fill_value進行填充?
df
和
other
,用相同的專欄中,我可以看到fill_value
參數:
DataFrame.mul(other, fill_value=...)
有如下解釋:
fill_value : None or float value, default None
Fill missing (NaN) values with this value. If both DataFrame locations are missing, the result will be missing
我該怎麼做乘法與填充前的行爲,使得對於df
不在other
那些行,我將填補前行中的其他,仍然得到結果行?
下面是一個例子:
df
1/1/2016 10
2/1/2016 20
3/1/2016 25
other
1/1/2016 1.5
3/1/2016 1.7
我想df.mul(其他),就好像其他必須採取行動
2/1/2016 1.5
以及
你能顯示什麼示例輸入和輸出數據框看起來像? –
已更新原始文章。 – MMM