title: I have a csv with inputs, I want output csv. inputs generates some urls and I want to append them to existing dataframe
body: <p>I have a CSV file with some keywords. With the keywords, I generate 10 - 15 URLs using the SERP API. I want to append the URLs to column URL with respect to that keyword. For one keyword there are multiple URLs. If I am not able to add URLs to respective keywords the keywords will be replicated with different URLs.</p>
  
  <p>test.csv file</p>
  
  <pre><code>keyword            value         cost
  electrician         15            3.6
  plumber             12            5.9
  </code></pre>
  
  <p>I want result like this to output.csv file</p>
  
  <pre><code>keyword        value     cost         url
  electrician     15       3.6        www.ex1.com
  electrician     15       3.6        www.ex2.com
  electrician     15       3.6        www.ex3.com
  .
  .
  .
  .
  plumber         12       5.9         www.ee.com
  plumber         12       5.9         www.ee2.com
  .
  .
  </code></pre>
  
  <p>.</p>
  
  <p>This is the code I am using; I have tried it with pandas but it appends only the last URL. </p>
  
  <pre><code>df = pd.read_csv("test.csv")                                                                                  
  col = df['keywords']                                                                                          
  for k in col:                                                                                                 
      print(k)                                                                                                  
      client_params = {                                                                                         
        "q": k,                                                                                                 
        "google_domain": "google.co.uk",                                                                        
        "location": "United+Kingdom",                                                                           
        "hl": "en",                                                                                             
        "gl": "uk",                                                                                             
        "num": "15",                                                                                            
        "serp_api_key": "********************",                     
      }                                                                                                         
      client = GoogleSearchResults(client_params)                                                               
      json_results = client.get_json()                                                                          
      #print(json_results)                                                                                      
      #print(type(json_results))                                                                                
      results = pd.DataFrame()                                                                                  
      print(results)                                                                                            
      for title in json_results['organic_results']:                                                             
          print(title['link'])                                                                                  
          df['URL'] = title['link']                                                                             
          results = results.append(df).reset_index(drop = True)                                                 
      # df.to_csv('output.csv',index=False, header= False)                                                      
  results.to_csv('output.csv',index=False)  
  </code></pre>
  
  <p>But this is the result I got:</p>
  
  <pre><code>keyword       value    cost       urls
  electrician    15      3.6      www.ex.xom
  plumber        12      5.9      www.ex.xom
  </code></pre>