title: Append new data into an existing frame and upload to sheets Python
body: <p>I'm connected to my APIs client, sent the credentials, I made the request, I asked the API for data and put it to a DF.</p>
  <p>Then, I have to upload this data to a sheet, so then this sheet is gonna be connected to PowerBI as a datasource in order to develop a dashboard and monitor some KPIs and so on..</p>
  <p><strong>Simple and common ETL process. BUT: to be honest, I'm a rookie and I'm doing my best.</strong></p>
  <p>Above here is just code to connect to the API, here is where the <strong>&quot;extraction&quot;</strong> begins</p>
  <pre><code>if response_page.status_code == 200:
      if page == 1 :
          df = pd.DataFrame(json.loads(response_page.content)[&quot;list&quot;])
      else :
          df2 = pd.DataFrame(json.loads(response_page.content)[&quot;list&quot;])
          
          df = df.append(df2)
  </code></pre>
  <p><strong>Then I just pick up but I need:</strong></p>
  <pre><code>columnas = ['orderId','totalValue','paymentNames']
  df2 = df[columnas]
  df2
  </code></pre>
  <p>This is what the DF looks like:</p>
  <p><a href="https://i.stack.imgur.com/KABAG.png" rel="nofollow noreferrer">example: this df is which I need to append the new data</a></p>
  <p>Then I've just connected to Sheets here, send the credentials, open the sheet(&quot;carrefourMetodosDePago&quot;) and the page(&quot;transacciones&quot;)</p>
  <pre><code>sa = gspread.service_account(filename=&quot;service_account.json&quot;)
  sh = sa.open(&quot;carrefourMetodosDePago&quot;)
  wks = sh.worksheet(&quot;transacciones&quot;)
  </code></pre>
  <p><strong>The magic begins:</strong></p>
  <pre><code>wks.update([df2.columns.values.tolist()] + df2.values.tolist())
  </code></pre>
  <p>With this sentence I upload what the picture shows, to the sheet!</p>
  <p><strong>I need the new data that generates the API to be appended/merged/concatenated to the current data so the code upload the current data PLUS the new everytime I run it and so forth.</strong></p>
  <p><strong>How can I do that? Should I use a for loop and iterate over every new data en append it to the sheet?</strong></p>
  <p>This is the best I could have done, I think I reached my turning point here...</p>
  <p>If I explained myself wrong just let me know.
  If you reach up to here just let me <strong>thank you</strong> to give me some time :)</p>