-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Setting DataFrame of Python objects and MultiIndex columns wth single-element NDFrame inserts list #14592
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
Labels
Milestone
Comments
Actually, I think the "numbers only" case has problems too. Take
Then the following works fine:
while...
|
This looks to give the correct result on master. Could use a test.
|
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A small, complete example of the issue
The same happens when providing, rather than a list of indices, a mask with only one
True
value.The above line is an useless example, but this is a problem in in-place operations.
I suspect the fix should not be very complicated, given that everything works smoothly if we have numbers rather than Python objects (the bug instead arises both if we assign a cell of a numbers-only DF to a cell of a DF of objects, and if we do the opposite)
Expected Output
Just the original
t
.Output of
pd.show_versions()
INSTALLED VERSIONS
commit: 7a2bcb6
python: 3.5.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.7.0-1-amd64
machine: x86_64
processor:
byteorder: little
LC_ALL: None
LANG: it_IT.utf8
LOCALE: it_IT.UTF-8
pandas: 0.19.0+67.g7a2bcb6.dirty
nose: 1.3.7
pip: 8.1.2
setuptools: 28.0.0
Cython: 0.23.4
numpy: 1.11.2
scipy: 0.18.1
statsmodels: 0.8.0.dev0+f80669e
xarray: None
IPython: 5.1.0.dev
sphinx: 1.4.8
patsy: 0.3.0-dev
dateutil: 2.5.3
pytz: 2015.7
blosc: None
bottleneck: 1.2.0dev
tables: 3.2.2
numexpr: 2.6.0
matplotlib: 1.5.3
openpyxl: None
xlrd: 1.0.0
xlwt: 1.1.2
xlsxwriter: 0.9.3
lxml: None
bs4: 4.5.1
html5lib: 0.999
httplib2: 0.9.1
apiclient: 1.5.2
sqlalchemy: 1.0.15
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.40.0
pandas_datareader: 0.2.1
The text was updated successfully, but these errors were encountered: