astroid
astroid copied to clipboard
Wrong E1101 issue raised on pd.DataFrame
Steps to reproduce
pip install pylint 2.4--> this will now installastroid==2.7.3as a dependency- Launch
pylint -E test.pyon 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
Hello, could you try on pylint 2.10.2 ? We're not supporting pylint 2.4 anymore.
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