title: How would I generate API call via Python while reading data from csv flle? I am using Pandas library and would need some guidance
body: <p>I am still learning Data Engeineering and Data Science, new and appreciate any advice.</p>
  <p>Long story short, I have managed to create Pandas script which updates already existing csv file into another one I need for further actions. Data sorted out, I lave learned so many things there. Good job. Script:</p>
  <pre><code>import pandas as pd
  dataset = &quot;csv_file.csv&quot;
  df = pd.read_csv(dataset, usecols=[0,1], header=0, names=['title', 'product_id'])
  df['title'] = df['title'].str.replace('&quot;', &quot;''&quot;)
  df['title'] = '&quot;' + df['title'] + '&quot;'
  print(df.head())
  df.to_csv(f'edited_csv.csv')
  </code></pre>
  <p>Now, I have been thinking about automation for running some bulk tasks I have. So, I am working on a small script so I can make numerous API calls where I am creating the product, using the title and product_id from the edited csv file.</p>
  <p>I was googling for a few days and found some sources. Until I get approval for testing, I would like to check this one out, to see if I am on the right path, or I should change the way I am thinking and learn some new ways.</p>
  <p>The edited csv file looks something like this:</p>
  <pre><code>title, product_id
  &quot;Name 1&quot;, 12345
  &quot;Name 2&quot;, 98765
  &quot;Name 3&quot;, 34566
  &quot;Nime 4&quot;, 78930
  &quot;Name 5&quot;, 99850
  </code></pre>
  <p>So, I have been implementing another small script for making those API calls. I hope I somehow got the point, but may miss a few things:</p>
  <pre><code>api_token = &quot;my_token&quot;
  df = pd.read_csv('edited_csv.csv')
  
      for i in range(len(df)):
          
          endpoint = f&quot;/api/mystore/products&quot;
          request_body = {
              &quot;product_id&quot;: df['product_id'],
              &quot;title&quot;: df['title'],
              &quot;my_discount_type&quot;: &quot;percentage&quot;,
              &quot;my_discount_amount&quot;: 15,
              &quot;store&quot;: &quot;Store3&quot;,
              &quot;versions&quot;: &quot;Black/White/Red&quot;
          }
          }
  </code></pre>
  <p>So, the goal would be to make products one by one, line by line, until I reach the end.
  I was a bit in dilemma if I should use while loop.</p>
  <p>Thank you in advance, good people.</p>