I'm using pandas excelWriter to write Excel files. The program runs without any issue, but I'd like to remove this warning.
Abstract class 'ExcelWriter' with abstract methods instantiatedpylint.
code:
def exportToExcel(df):
# excell writer
writer = pd.ExcelWriter('Top100Triggers.xlsx')
df.to_excel(writer, sheet_name='Sheet1',index=False)
writer.save()
Abstract class 'ExcelWriter' with abstract methods instantiatedpylint. It's a pylint issue that a ticket submited for it ( pylink issue ticket) If you feel that it's really annoying, add # pylint: disable=abstract-class-instantiated right after writer line line:
# Syntax of pandas.ExcelWriter class pandas. ExcelWriter ( path, engine = None, date_format = None, datetime_format = None, mode ='w', storage_options = None, if_sheet_exists = None, engine_kwargs = None, ** kwargs) Following are some params. path – Path where to save file.
Abstract Classes in Python. Last Updated: 01-04-2020. An abstract class can be considered as a blueprint for other classes. It allows you to create a set of methods that must be created within any child classes built from the abstract class. A class which contains one or more abstract methods is called an abstract class.
The ExcelWriter() can be used to write text, number, strings, formulas. It can work on multiple worksheets also. Python Pandas is a data analysis library. It can read, filter, and re-arrange small and large data sets and output them in a range of formats, including Excel. The ExcelWriter() is defined under the Pandas library.
It's a pylint issue that a ticket submited for it (pylink issue ticket) If you feel that it's really annoying, add # pylint: disable=abstract-class-instantiated
right after writer line line:
writer = pd.ExcelWriter('Top100Triggers.xlsx') # pylint: disable=abstract-class-instantiated
Pylint will temporarily ignore that line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With