Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Data Science by (50.2k points)

Is there any way to hide E1101 errors for objects that are created from a specific library? Our large repository is littered with #pylint: disable=E1101 around various objects created by pandas.

For example, pylint will throw a no member error on the following code:

import pandas.io.data

import pandas as pd

spy = pandas.io.data.DataReader("SPY", "yahoo")

spy.to_csv("test.csv")

spy = pd.read_csv("test.csv")

close_px = spy.ix["2012":]

Will have the following errors:

E:  6,11: Instance of 'tuple' has no 'ix' member (no-member)

E:  6,11: Instance of 'TextFileReader' has no 'ix' member (no-member)

1 Answer

0 votes
by (107k points)

You just have to mark their attributes as dynamically generated using the generated-members option. For pandas:

generated-members=pandas.*

Point to be noted: Make sure your .pylintrc file is actually being read, and that your regex is correct

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...