0

How can I read excel file from a url into a dataframe?

import requests
request_url = 'https://pishtazfund.com/Download/DownloadNavChartList?exportType=Excel&fromDate=5/9/2008&toDate=2/22/2022&basketId=0'
response = requests.get(request_url, headers={'Accept': 'text/html'})

I can not convert the response into a dataframe, any idea or solution appreciated

1

1 Answer 1

1

You can use panda's read_csv()

import pandas as pd

df = pd.read_csv('https://pishtazfund.com/Download/DownloadNavChartList?exportType=Excel&fromDate=5/9/2008&toDate=2/22/2022&basketId=0')
Sign up to request clarification or add additional context in comments.

1 Comment

This technique does not work for the given url, furthermore, I have to use "request"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.