-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Constructing DataFrame from list of series with MultiIndex, if MultiIndex contains (NaN, NaN) #43222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks @sziem for the report. There appears to be a change of behaviour here since 1.2.5 although the results on 1.2.5 look iffy.
However the last example does appear to give the correct result with 1.2.5?
will label as a regression for the last case pending further investigation. |
maybe not. |
This is related to #37222 We changed the code paths we are running through for 1.3 |
changing milestone to 1.3.5 |
good to fix but not for 1.3.x |
moving off 1.3.x 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.
I have observed a few issues, when constructing a dataframe from a list of series with multiindices, if any multiindex contains (NaN, NaN).
Code Sample, a copy-pastable example
Problem description
Expected Output
and the reverse case
This behavior is not limited to both series containing the MultiIndex (NaN, NaN). Here is an example, where only one series is constructed with (None, None). The column ("a", "b") is missing.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : f346574
python : 3.9.6.final.0
python-bits : 64
OS : Linux
OS-release : 5.10.59-1-MANJARO
Version : #1 SMP PREEMPT Sun Aug 15 13:11:32 UTC 2021
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : en_US.utf8
LOCALE : en_US.UTF-8
pandas : 0+untagged.1.gf346574
numpy : 1.21.1
pytz : 2021.1
dateutil : 2.8.2
pip : 21.1.3
setuptools : 57.4.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 7.26.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 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: