Receiving TypeError, when PandasCursor is imported from pyathena.pandas.cursor

335 Views Asked by At

I want to read an excel file into pandas from an AWS S3 bucket. Everything worked fine But when I import PandasCursor, which I need for another part of the code, I receive the following error message:

import pandas as pd
import s3fs
from pyathena import connect
from pyathena.pandas.cursor import PandasCursor

path = "s3://some/path/to/file.xlsx"
df = pd.read_excel(path)

>>>TypeError: S3FileSystem.__init__() missing 1 required positional argument: 'connection'

Can anyone explain what is happening and how I can fix it? From the pyathena docs I don't understand how PandasCursor is influencing pd.read_excel()

0

There are 0 best solutions below