wearepal / data-science-types

Mypy stubs, i.e., type information, for numpy, pandas and matplotlib
Apache License 2.0
202 stars 52 forks source link

Pandas errors on 0.2.22 #222

Closed boardtc closed 3 years ago

boardtc commented 3 years ago

I am working with Anaconda3-2020.11 and did a conda install -c conda-forge data-science-types which installed data-science-types conda-forge/noarch::data-science-types-0.2.22-pyhd8ed1ab_0

Previously I got: error: Skipping analyzing 'pandas': found module but no type hints or library stubs

After installing data-science-types I get the new errors: error: Name 'pd.core.frame.Series' is not defined error: Module has no attribute "read_excel"

tmke8 commented 3 years ago

Yes, I'm sorry about that. This is because the type stubs are not complete. For example, in this package there is no definition of read_excel(). There are two possible solutions:

  1. someone adds the missing type definitions to this package
  2. you add # type: ignore at the end of the line
boardtc commented 3 years ago

Thanks very much for the info! I did not know about #2. I could try and contribute perhaps, I never have for open source before, any tips on what to read up regarding how to add stuff (for read_excel)?