I'm writing a script with the Pandas library that involves reading the contents of an excel file.
The line currently looks like this:
test = pd.read_excel(archive_contents['spreadsheet.xlsx'])
The script works as intended with no issues, but I get a future warning depicting the following:
FutureWarning: Passing bytes to 'read_excel' is deprecated and will be removed in a future version. To read from a byte string, wrap it in a `BytesIO` object.
test = pd.read_excel(archive_contents['spreadsheet.xlsx'])
In the interest of future proofing my code, how would I go about doing that?
Alternatively you could pass it a string, assuming decoding with
utf-8
is enough: