{"action":"opened","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/21345","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21345/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21345/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21345/events","html_url":"https://github.com/pandas-dev/pandas/issues/21345","id":329994799,"node_id":"MDU6SXNzdWUzMjk5OTQ3OTk=","number":21345,"title":"read_json with table='orient' causes unexpected type coercion","user":{"login":"pyryjook","id":4008031,"node_id":"MDQ6VXNlcjQwMDgwMzE=","avatar_url":"https://avatars2.githubusercontent.com/u/4008031?v=4","gravatar_id":"","url":"https://api.github.com/users/pyryjook","html_url":"https://github.com/pyryjook","followers_url":"https://api.github.com/users/pyryjook/followers","following_url":"https://api.github.com/users/pyryjook/following{/other_user}","gists_url":"https://api.github.com/users/pyryjook/gists{/gist_id}","starred_url":"https://api.github.com/users/pyryjook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyryjook/subscriptions","organizations_url":"https://api.github.com/users/pyryjook/orgs","repos_url":"https://api.github.com/users/pyryjook/repos","events_url":"https://api.github.com/users/pyryjook/events{/privacy}","received_events_url":"https://api.github.com/users/pyryjook/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-06T19:07:29Z","updated_at":"2018-06-06T19:07:29Z","closed_at":null,"author_association":"NONE","body":"#### Code Sample, a copy-pastable example if possible\r\n\r\n```python\r\nimport pandas as pd\r\n\r\ndf = pd.DataFrame([[1., 2., 3.], [1., 2., 3.], [1., 2., 3.]], columns=['a', 'b', 'c'])\r\nout = df.to_json(orient='table')\r\nresult = pd.read_json(out, orient='table')\r\npd.testing.assert_frame_equal(df, result)\r\n\r\n```\r\n#### Problem description\r\n\r\nAssertion fails with error:\r\n```\r\nAttribute \"dtype\" are different\r\n[left]:  float64\r\n[right]: int64\r\n```\r\nError is related to this method: https://github.com/pandas-dev/pandas/blob/master/pandas/io/json/json.py#L659\r\n\r\n#### Expected Output\r\n\r\nExpected result is passing assertion. Original DF and the JSON round-tripped DF should have same dtype.\r\n\r\n#### Output of ``pd.show_versions()``\r\n\r\n<details>\r\n\r\nINSTALLED VERSIONS\r\n------------------\r\ncommit: 2461b90a14b7e9276e06be09aa96a9cbf8f39686\r\npython: 3.6.4.final.0\r\npython-bits: 64\r\nOS: Darwin\r\nOS-release: 16.7.0\r\nmachine: x86_64\r\nprocessor: i386\r\nbyteorder: little\r\nLC_ALL: en_US.UTF-8\r\nLANG: en_US.UTF-8\r\nLOCALE: en_US.UTF-8\r\n\r\npandas: 0.24.0.dev0+72.g2461b90a1.dirty\r\npytest: 3.6.0\r\npip: 9.0.1\r\nsetuptools: 28.8.0\r\nCython: 0.28.3\r\nnumpy: 1.14.3\r\nscipy: 1.1.0\r\npyarrow: 0.9.0.post1\r\nxarray: 0.10.6\r\nIPython: 6.4.0\r\nsphinx: 1.7.5\r\npatsy: None\r\ndateutil: 2.7.3\r\npytz: 2018.4\r\nblosc: 1.5.1\r\nbottleneck: 1.2.1\r\ntables: 3.4.3\r\nnumexpr: 2.6.5\r\nfeather: 0.4.0\r\nmatplotlib: 2.2.2\r\nopenpyxl: 2.5.3\r\nxlrd: 1.1.0\r\nxlwt: 1.3.0\r\nxlsxwriter: 1.0.5\r\nlxml: 4.2.1\r\nbs4: 4.6.0\r\nhtml5lib: 1.0.1\r\nsqlalchemy: 1.2.8\r\npymysql: 0.8.1\r\npsycopg2: None\r\njinja2: 2.10\r\ns3fs: 0.1.5\r\nfastparquet: 0.1.5\r\npandas_gbq: None\r\npandas_datareader: None\r\n\r\n</details>\r\n"}}
{"actor":{"display_login":"pyryjook"}}