Hi, I am trying to read a parquet file using pandas and vaex. I can sucessfully read a .csv but I get the following error message when I try to download the parquet file with dbx.files_download :
dropbox.exceptions.ApiError: ApiError('4ce7ef4f93544a4fa18c29478e1869a8', DownloadError('path', LookupError('not_file', None)))
Full code:
ACCESS_TOKEN = "My_Token"
# Initialize the Dropbox API client
dbx = dropbox.Dropbox(ACCESS_TOKEN)
# download csv file from dropbox
metadata, f_csv = dbx.files_download('/County_test.csv')
# this works for csv and pandas
with io.BytesIO(f_csv.content) as stream:
df = pd.read_csv(stream, index_col=0)
print(df)
# this works for csv and vaex
with io.BytesIO(f_csv.content) as stream:
df = vaex.read_csv(stream, index_col=0)
print(df)
# download parquet file from dropbox FAILS
metadata, f_parquet = dbx.files_download('/County_test.parquet')
# this part NOT tested yet
with io.BytesIO(f_parquet.content) as stream:
df = pd.read_parquet(stream, index_col=0)
print(df)