Skip to content

Instantly share code, notes, and snippets.

@ivansaul
Created February 7, 2021 04:31
Show Gist options
  • Save ivansaul/606838955fc3ee1db3315767400c42b6 to your computer and use it in GitHub Desktop.
Save ivansaul/606838955fc3ee1db3315767400c42b6 to your computer and use it in GitHub Desktop.
Read Excel file (.xlsx) into pandas data frame from GitLab url
import pandas as pd
import requests
url= 'https://gitlab.com/username/repo/-/raw/master/data.xlsx'
myfile = requests.get(url)
df=pd.read_excel(myfile.content)
print(df)
@dudung
Copy link

dudung commented Oct 9, 2023

  • The - should be substituted with blob, right?
  • If the repo is private, who we can do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment