title: Merge 2 SparseDataFrame with same index/columns
body: <p>I have 2 <a href="https://pandas.pydata.org/pandas-docs/stable/sparse.html#sparsedataframe" rel="nofollow noreferrer"><code>pandas.SparseDataFrame</code>'s</a> in the form</p>
  
  <pre><code>A = pd.SparseDataFrame(
      [[a,0,0,b],A
       [0,0,0,c],
       [0,0,0,0],
       [0,0,0,a]])
  
  B = pd.SparseDataFrame(
      [[a,0,0,0],
       [0,0,c,0],
       [0,0,0,c],
       [0,0,0,0]])
  </code></pre>
  
  <p>Those are (labeled) adjacency matrix of subgraphs coming from the same graph (so in same position you can find 0 or the same value: <em>A[x][y]=B[x][y] for each values!=0</em>). In other words, value conflicts aren't possible.</p>
  
  <p>I want to merge (<em>performance wise</em>) those dataframes, the result should be:</p>
  
  <pre><code>[[a,0,0,b],
   [0,0,c,c],
   [0,0,0,c],
   [0,0,0,a]]
  </code></pre>
  
  <p>I'm not clear what's the pandas way to merge 2 Dataframes with the same columns labels.</p>
  
  <p>I see there is <a href="https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.update.html" rel="nofollow noreferrer">update()</a> which works as I want, but it edits the calling DataFrame in-place, I don't want that. The only way is a deep-copy and then a merge using update()? As I said, the operation should be performance-wise..</p>