Describe the Bug
When df.to_excel to a BytesIO , the VS extension flags below error
Argument `BytesIO` is not assignable to parameter `excel_writer` with type `ExcelWriter[Unknown] | PathLike[str] | WriteExcelBuffer | str` in function `pandas.core.generic.NDFrame.to_excel`
code:
from io import BytesIO
import pandas as pd
import openpyxl
bytesio = BytesIO()
df = pd.DataFrame(columns = pd.Index(["A","B","C"]))
df.to_excel(bytesio, engine="openpyxl", index=False)
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response