question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pandas.ExcelWriter has abstract methods

See original GitHub issue

Code Sample, a copy-pastable example if possible

"""Lorem ipsum"""

import pandas as pd


def demo():
    """Demo for the false positive"""
    with pd.ExcelWriter("demo.xlsx") as writer:
        print(writer)

Problem description

The code shown above gives pylint: abstract-class-instantiated(E0110): test.py:8:9: demo: Abstract class 'ExcelWriter' with abstract methods instantiated

Expected Output

No pylint issue: no abstract method left

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit           : None
python           : 3.7.4.final.0
python-bits      : 64
OS               : Linux
OS-release       : 4.15.0-54-generic
machine          : x86_64
processor        : x86_64
byteorder        : little
LC_ALL           : None
LANG             : en_US.UTF-8
LOCALE           : en_US.UTF-8

pandas           : 0.25.0
numpy            : 1.16.4
pytz             : 2019.1
dateutil         : 2.8.0
pip              : 19.2.1
setuptools       : 40.8.0
Cython           : 0.29.12
pytest           : 5.0.1
hypothesis       : None
sphinx           : None
blosc            : None
feather          : None
xlsxwriter       : 1.1.8
lxml.etree       : 4.3.4
html5lib         : None
pymysql          : None
psycopg2         : 2.8.3 (dt dec pq3 ext lo64)
jinja2           : 2.10.1
IPython          : 7.6.1
pandas_datareader: None
bs4              : 4.8.0
bottleneck       : 1.2.1
fastparquet      : None
gcsfs            : None
lxml.etree       : 4.3.4
matplotlib       : 3.1.1
numexpr          : 2.6.9
odfpy            : None
openpyxl         : None
pandas_gbq       : None
pyarrow          : None
pytables         : None
s3fs             : None
scipy            : 1.3.0
sqlalchemy       : None
tables           : None
xarray           : None
xlrd             : 1.2.0
xlwt             : None
xlsxwriter       : 1.1.8

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
vule24commented, Dec 21, 2019

If you feel that it’s really annoying, add # pylint: disable=abstract-class-instantiated right after with line:

with pd.ExcelWriter("demo.xlsx") as writer: # pylint: disable=abstract-class-instantiated

Pylint will temporarily ignore that line.

1reaction
mhooremancommented, Aug 13, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

pandas : Abstract class 'ExcelWriter' with abstract methods ...
The program runs without any issue, but I'd like to remove this warning. Abstract class 'ExcelWriter' with abstract methods instantiatedpylint.
Read more >
Python – pandas : Abstract class 'ExcelWriter' with ... - iTecNote
Python – pandas : Abstract class 'ExcelWriter' with abstract methods instantiatedpylint python. I'm using pandas excelWriter to write Excel files. The program ...
Read more >
pandas.ExcelWriter — pandas 1.5.2 documentation
Class for writing DataFrame objects into excel sheets. Default is to use: xlwt for xls files. xlsxwriter for xlsx files if xlsxwriter is...
Read more >
python:pandas-error-Abstract class 'ExcelWriter ... - CSDN博客
python :pandas-error-Abstract class 'ExcelWriter' with abstract methods ... a class with an abstract method cannot be instantiated (that is, ...
Read more >
How to Auto-Adjust the Width of Excel Columns with Pandas ...
ExcelWriter and Python ... Now the output pandas DataFrame in the Excel spreadsheet is way more readable and it definitely looks better.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found