BUG: ExtensionArray test_unstack
assumes missing values are nan
#36986
Labels
Bug
ExtensionArray
Extending pandas with custom dtypes or arrays.
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Running pytest with this fixture:
Problem description
I'm working on an ExtensionArray as part of a package called pandas-genomics.
I've almost got all of the ExtensionArray tests passing. It isn't possible to pass
test_unstack
without altering the test itself. For example, theseries-index1
test case fails this assertion:In this case,
result
isand
expected
is<Missing>
is the na_value for my ExtensionDtype.I've confirmed that this is resolved by using fill_value to supply the na_value
Expected Output
Test passes
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : db08276
python : 3.7.7.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19041
machine : AMD64
processor : Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 1.1.3
numpy : 1.19.2
pytz : 2020.1
dateutil : 2.8.1
pip : 19.2.3
setuptools : 41.2.0
Cython : None
pytest : 5.4.3
hypothesis : None
sphinx : 3.2.1
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.18.1
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: