title: How to convert DataFrame.append() to pandas.concat()?
body: <p>In pandas 1.4.0: <code>append()</code> was deprecated, and the docs say to use <code>concat()</code> instead.</p>
  <blockquote>
  <p>FutureWarning: The frame.append method is deprecated and will be
  removed from pandas in a future version. Use pandas.concat instead.</p>
  </blockquote>
  <p><strong>Codeblock in question:</strong></p>
  <pre class="lang-python prettyprint-override"><code>def generate_features(data, num_samples, mask):
      &quot;&quot;&quot;
      The main function for generating features to train or evaluate on.
      Returns a pd.DataFrame()
      &quot;&quot;&quot;
      logger.debug(&quot;Generating features, number of samples&quot;, num_samples)
      features = pd.DataFrame()
  
      for count in range(num_samples):
          row, col = get_pixel_within_mask(data, mask)
          input_vars = get_pixel_data(data, row, col)
          features = features.append(input_vars)
          print_progress(count, num_samples)
  
      return features
  </code></pre>
  <p><strong>These are the two options I've tried, but did not work:</strong></p>
  <pre><code>features = pd.concat([features],[input_vars])
  </code></pre>
  <p>and</p>
  <pre><code>pd.concat([features],[input_vars])
  </code></pre>
  <p><strong>This is the line that is deprecated and throwing the error:</strong></p>
  <pre><code>features = features.append(input_vars)
  </code></pre>