pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
43.71k stars 17.92k forks source link

ExtensionArray._can_hold_na needs to be a class attribute #20761

Closed Dr-Irv closed 6 years ago

Dr-Irv commented 6 years ago

Problem description

ExtensionArray._can_hold_na is implemented as an instance property, but needs to be a class attribute to be consistent with its use throughout pandas.

(Note - I am working on a PR that will take care of this)

Output of pd.show_versions()

INSTALLED VERSIONS ------------------ commit: f463cf26b35ec11ae4fdf332635d6e89a9db2f17 python: 3.6.4.final.0 python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None pandas: 0.23.0.dev0+747.gf463cf26b.dirty pytest: 3.4.0 pip: 9.0.1 setuptools: 38.5.1 Cython: 0.25.1 numpy: 1.14.1 scipy: 1.0.0 pyarrow: 0.8.0 xarray: None IPython: 6.2.1 sphinx: 1.7.1 patsy: 0.5.0 dateutil: 2.6.1 pytz: 2018.3 blosc: 1.5.1 bottleneck: 1.2.1 tables: 3.4.2 numexpr: 2.6.4 feather: None matplotlib: 2.2.0 openpyxl: 2.5.0 xlrd: 1.1.0 xlwt: 1.3.0 xlsxwriter: 1.0.2 lxml: 4.1.1 bs4: 4.6.0 html5lib: 1.0.1 sqlalchemy: 1.2.5 pymysql: 0.8.0 psycopg2: None jinja2: 2.10 s3fs: 0.1.3 fastparquet: None pandas_gbq: None pandas_datareader: None
TomAugspurger commented 6 years ago

@Dr-Irv do you have an ETA for your PR?

Dr-Irv commented 6 years ago

@TomAugspurger Made good progress this morning, so I'm pretty sure I will submit by late afternoon today (Monday, 4/26). I'm sure that you and others will have lots of changes to request!