astroid icon indicating copy to clipboard operation
astroid copied to clipboard

Wrong E1101 issue raised on pd.DataFrame

Open theomeb opened this issue 4 years ago • 2 comments

Steps to reproduce

  1. pip install pylint 2.4 --> this will now install astroid==2.7.3 as a dependency
  2. Launch pylint -E test.py on the following snippet:
import pandas as pd

df = pd.read_csv("data.csv")
df.reset_index(drop=True, inplace=True)

new_df = df.iloc[2]

print(new_df.head())

Current behavior

The following warning raised: E1101: Instance of 'TextFileReader' has no 'iloc' member (no-member) for line 6.

This happens since the last update of astroid to 2.7.3, this is why I raise an issue here. Happy to raise it also on pylint if you think it's more appropriate 🙂

Expected behavior

python -c "from astroid import __pkginfo__; print(__pkginfo__.version)" output

pylint 2.4.0
astroid 2.7.3
Python 3.6.9 

theomeb avatar Aug 31 '21 15:08 theomeb

Hello, could you try on pylint 2.10.2 ? We're not supporting pylint 2.4 anymore.

Pierre-Sassoulas avatar Aug 31 '21 16:08 Pierre-Sassoulas

Hello,

Thanks for the suggestion, but I still have the same issue with these versions:

pylint 2.10.2
astroid 2.7.3
Python 3.6.9

theomeb avatar Sep 01 '21 11:09 theomeb