Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pandas : Abstract class 'ExcelWriter' with abstract methods instantiatedpylint python

Tags:

python

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()
like image 244
Valakatla Ashok Avatar asked Jan 30 '20 10:01

Valakatla Ashok


People also ask

Is it possible to disable abstract class instantiated in Pylint?

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:

What is the syntax of excelwriter in pandas?

# 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.

What is an abstract class in Python?

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.

What is the use of excelwriter() in Python?

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.


1 Answers

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.

like image 115
Milad Saeedi Avatar answered Sep 19 '22 15:09

Milad Saeedi