{"action":"created","issue":{"url":"https://api.github.com/repos/hgrecco/pint/issues/703","repository_url":"https://api.github.com/repos/hgrecco/pint","labels_url":"https://api.github.com/repos/hgrecco/pint/issues/703/labels{/name}","comments_url":"https://api.github.com/repos/hgrecco/pint/issues/703/comments","events_url":"https://api.github.com/repos/hgrecco/pint/issues/703/events","html_url":"https://github.com/hgrecco/pint/pull/703","id":362705960,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3MzQ4ODM1","number":703,"title":"Fix dequantify bug","user":{"login":"znicholls","id":23625371,"node_id":"MDQ6VXNlcjIzNjI1Mzcx","avatar_url":"https://avatars2.githubusercontent.com/u/23625371?v=4","gravatar_id":"","url":"https://api.github.com/users/znicholls","html_url":"https://github.com/znicholls","followers_url":"https://api.github.com/users/znicholls/followers","following_url":"https://api.github.com/users/znicholls/following{/other_user}","gists_url":"https://api.github.com/users/znicholls/gists{/gist_id}","starred_url":"https://api.github.com/users/znicholls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/znicholls/subscriptions","organizations_url":"https://api.github.com/users/znicholls/orgs","repos_url":"https://api.github.com/users/znicholls/repos","events_url":"https://api.github.com/users/znicholls/events{/privacy}","received_events_url":"https://api.github.com/users/znicholls/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-09-21T17:18:25Z","updated_at":"2018-10-01T14:52:36Z","closed_at":"2018-10-01T12:49:23Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/hgrecco/pint/pulls/703","html_url":"https://github.com/hgrecco/pint/pull/703","diff_url":"https://github.com/hgrecco/pint/pull/703.diff","patch_url":"https://github.com/hgrecco/pint/pull/703.patch"},"body":"At the moment, if you take a pint dataframe and dequantify it, you lose all the index information e.g. \r\n\r\n```python\r\ndf\r\n```\r\n\r\n```python\r\n    speed mech power torque  rail pressure fuel flow rate fluid power\r\n      rpm         kW    N m            bar          l/min          kW\r\na c  1000        NaN     10           1000             10         NaN\r\nb c  1100        NaN     10  1000000000000             10         NaN\r\na d  1200        NaN     10           1000             10         NaN\r\nb d  1200        NaN     10           1000             10         NaN\r\n```\r\n\r\n`quantify` works fine\r\n\r\n```python\r\ndf.pint.quantify(ureg)\r\n```\r\n\r\n\r\n```python\r\n      speed mech power torque    rail pressure fuel flow rate fluid power\r\na c  1000.0        nan   10.0           1000.0           10.0         nan\r\nb c  1100.0        nan   10.0  1000000000000.0           10.0         nan\r\na d  1200.0        nan   10.0           1000.0           10.0         nan\r\nb d  1200.0        nan   10.0           1000.0           10.0         nan\r\n```\r\n\r\n`dequantify` after quantification doesn't (and also changes the type of nan oddly enough...)\r\n\r\n```python\r\ndf.pint.quantify(ureg).pint.dequantify()\r\n```\r\n\r\n```python\r\n                   speed mech power         torque rail pressure fuel flow rate fluid power\r\n  revolutions_per_minute   kilowatt meter * newton           bar liter / minute    kilowatt\r\n0                 1000.0        NaN           10.0  1.000000e+03           10.0         NaN\r\n1                 1100.0        NaN           10.0  1.000000e+12           10.0         NaN\r\n2                 1200.0        NaN           10.0  1.000000e+03           10.0         NaN\r\n3                 1200.0        NaN           10.0  1.000000e+03           10.0         NaN\r\n```\r\n\r\nThis is my attempt to fix that. @andrewgsavage might have a better solution/suggestions of other tests we should write.\r\n\r\nAnnoyingly I had to make our test csv all floats as I couldn't work out how to get the dataframe testing to work without this"},"comment":{"url":"https://api.github.com/repos/hgrecco/pint/issues/comments/425937181","html_url":"https://github.com/hgrecco/pint/pull/703#issuecomment-425937181","issue_url":"https://api.github.com/repos/hgrecco/pint/issues/703","id":425937181,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTkzNzE4MQ==","user":{"login":"znicholls","id":23625371,"node_id":"MDQ6VXNlcjIzNjI1Mzcx","avatar_url":"https://avatars2.githubusercontent.com/u/23625371?v=4","gravatar_id":"","url":"https://api.github.com/users/znicholls","html_url":"https://github.com/znicholls","followers_url":"https://api.github.com/users/znicholls/followers","following_url":"https://api.github.com/users/znicholls/following{/other_user}","gists_url":"https://api.github.com/users/znicholls/gists{/gist_id}","starred_url":"https://api.github.com/users/znicholls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/znicholls/subscriptions","organizations_url":"https://api.github.com/users/znicholls/orgs","repos_url":"https://api.github.com/users/znicholls/repos","events_url":"https://api.github.com/users/znicholls/events{/privacy}","received_events_url":"https://api.github.com/users/znicholls/received_events","type":"User","site_admin":false},"created_at":"2018-10-01T14:52:36Z","updated_at":"2018-10-01T14:52:36Z","author_association":"CONTRIBUTOR","body":"opened #709 for further discussion"}}
{"actor":{"display_login":"znicholls"}}