L
L
labarym2021-12-09 21:30:12
Python
labarym, 2021-12-09 21:30:12

Reading an excel file in the cloud?

I can not figure out the request to read the xlsx file, via a direct link from the cloud. The documentation for pandas says what can be read via a direct link? and even following the example from the Internet, I succeeded, only csv format. I already placed the file on dropbox, which immediately gives a direct link, and still gives the error "ValueError: Excel file format cannot be determined, you must specify an engine manually"
Please help, what is the error?

import requests
import pandas as pd

df = pd.read_excel(" https://www.dropbox.com/scl/fi/roa7g445nd78c5u179b... ", sheet_name='Sheet1')

print(df.head(2))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2021-12-09
@rPman

Your link does not give an excel file, but an html page with authorization.
Dropbox and other cloud file storages with free limits do not give direct access to the file, authorization is still needed there (because otherwise they begin to be ruthlessly exploited with the help of simple layers, with registration of 100500 accounts)
ps look for webdav access to files, as far as I know of the same Yandex, it is
even better - use amazon s3 or analogues,
well, or the most ideal (cheapest) of all, raise your server and distribute it according to your protocols and rules

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question