Pandas has a very convenient ability to read csv and other formats from URLs. However, when the data is protected by simple HTTP authentication, Pandas cannot ask the user for authentication data (userid, password). What is the best way to fix this restriction?
what am i doing now:
response = requests.get('http://my.data.url/metrics/crawler/counts', auth=HTTPBasicAuth('userid', 'password'), stream=True) pd.read_csv(response.raw)
is there a better way?
source share