title: Replace append with concat
body: <p>i want replace the append() with the concat() from pandas. But when i try to replace my output is different. Thank you</p>
  <p>old with append():</p>
  <pre><code>def gettrigger(self):
      dfx = pd.DataFrame()
      for i in range(self.lags +1):
          mask = (self.df[&quot;%K&quot;].shift(i) &lt; 20) &amp; (self.df[&quot;%D&quot;].shift(i) &lt; 20)
          dfx = dfx.append(mask, ignore_index=True)
      return dfx.sum(axis=0)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/zuFEW.png" rel="nofollow noreferrer">output with append()</a></p>
  <p>new with pd.concat():</p>
  <pre><code>def gettrigger(self):
      dfx = pd.DataFrame()
      for i in range(self.lags +1):
          mask = (self.df[&quot;%K&quot;].shift(i) &lt; 20) &amp; (self.df[&quot;%D&quot;].shift(i) &lt; 20)
          #dfx = dfx.append(mask, ignore_index=True)
          dfx = pd.concat([dfx, mask], ignore_index=True)
      return dfx.sum(axis=0)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/SBpgJ.png" rel="nofollow noreferrer">output with pd.concat()</a></p>