A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/10289 below:

mixed data type to_json(orient='index') repeats only the first index value · Issue #10289 · pandas-dev/pandas · GitHub

from pandas import DataFrame
df = DataFrame({
    'one' : pandas.Series(['foo','bar','bee'],index=['a','b','c']),
    'two' : pandas.Series([1,2,3],index=['a','b','c'])   } )
df.to_json(orient='index')

Observe that the first index value 'a' is used for all the record returned, rather than for just the first one. I've reproduced this issue on a linux machine with the config below, but it was first observed on OSX and can reproduce it on Windows, all with pandas 0.16.1.

This issue was not present in pandas version 0.14.x

pandas.show_versions()

INSTALLED VERSIONS

commit: None
python: 2.6.8.final.0
python-bits: 64
OS: Linux
OS-release: 2.6.18-274.el5
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.16.1
nose: None
Cython: None
numpy: 1.9.2
scipy: None
statsmodels: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.4.2
pytz: 2015.4
bottleneck: None
tables: 3.2.0
numexpr: 2.4.3
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4