Hi all i am trying to pass input from csv file to my url and file contains million records so the response is very slow it takes alot time and sometime get timed out can anyone help me to make it faster i can provide the code but not the data and url as it is confidential. here is my code:
import pandas as pd
import requests
import json
from pandas.io.json import json_normalize
from flatten_json import flatten
df=pd.read_excel('C:/data1.xlsx',index=None,index_col=None,encoding='UTF-8')
df.head(5)
df.shape
df=df[['NAME','country']]
df.head(5)
passwd=b"abc"
user=b"xxxxx"
# Make a request to the endpoint using the correct auth values
auth_values = (user,passwd)
dd=df.values
dfj = pd.DataFrame()
for i,j in dd:
url='http:xyz.com/&name='+str(i)+'&country='+str(j)
resp = requests.get(url,auth=auth_values)
r=resp.json()
Please modify this code to make it faster
thanks in advance for help
enter code here