+3 votes
in Programming Languages by (46.3k points)
I have to read an excel file present on Github using Python. Which Python function should I use to read it?

1 Answer

+2 votes
by (33.7k points)
selected by
 
Best answer

If you have the latest version of pandas installed on your computer, you can use its read_excel() function to read an excel file to get a dataframe.

Here is an example that reads a ".xlsx" file on Github and returns a dataframe.

import pandas as pd

df = pd.read_excel("https:/ /raw.githubusercontent.com/.../yourfile.xlsx")

To use the above code, replace the file URL with the actual URL.


...