擅长:python、mysql、java
<p>你可以尝试这样的方法,假设你正在处理一个系列:</p>
<pre><code>ser = data['column_with_nulls_to_replace']
index = ser[ser.isnull()].index
df = pd.DataFrame(np.random.randn(len(index)), index=index, columns=['column_with_nulls_to_replace'])
ser.update(df)
</code></pre>