{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/9759","labels_url":"https://api.github.com/repos/pydata/pandas/issues/9759/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/9759/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/9759/events","html_url":"https://github.com/pydata/pandas/issues/9759","id":65434346,"number":9759,"title":"FloatArrayFormatter._format_strings cannot handle float arrays containing NaNs","user":{"login":"willfurnass","id":1249695,"avatar_url":"https://avatars.githubusercontent.com/u/1249695?v=3","gravatar_id":"","url":"https://api.github.com/users/willfurnass","html_url":"https://github.com/willfurnass","followers_url":"https://api.github.com/users/willfurnass/followers","following_url":"https://api.github.com/users/willfurnass/following{/other_user}","gists_url":"https://api.github.com/users/willfurnass/gists{/gist_id}","starred_url":"https://api.github.com/users/willfurnass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willfurnass/subscriptions","organizations_url":"https://api.github.com/users/willfurnass/orgs","repos_url":"https://api.github.com/users/willfurnass/repos","events_url":"https://api.github.com/users/willfurnass/events{/privacy}","received_events_url":"https://api.github.com/users/willfurnass/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Dtypes","name":"Dtypes","color":"e102d8"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Error%20Reporting","name":"Error Reporting","color":"ffa0ff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-31T11:55:39Z","updated_at":"2015-04-08T09:19:48Z","closed_at":"2015-04-04T18:34:13Z","body":"Get `FloatingPointError` ([stack trace](http://pastebin.com/m1fZH4ie)) if call `to_html` method of a DataFrame that contains some NaN values.  To reproduce:\r\n\r\n````python\r\nimport pandas as pd\r\nimport numpy as np\r\npd.DataFrame(data=[np.nan, 3, 4]).to_html()\r\n````\r\n\r\nThe problem seems to be that `FloatArrayFormatter._format_strings` assumes that the array it is trying to format as a string contains no `np.nan` values when checking to see if the array contains any very large or very small values.\r\n\r\nVersion info:\r\n```\r\ncommit: None\r\npython: 3.4.3.final.0\r\nOS: Linux\r\nmachine: x86_64\r\npandas: 0.16.0\r\nCython: 0.22\r\nnumpy: 1.9.2\r\n```"},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/90858381","html_url":"https://github.com/pydata/pandas/issues/9759#issuecomment-90858381","issue_url":"https://api.github.com/repos/pydata/pandas/issues/9759","id":90858381,"user":{"login":"willfurnass","id":1249695,"avatar_url":"https://avatars.githubusercontent.com/u/1249695?v=3","gravatar_id":"","url":"https://api.github.com/users/willfurnass","html_url":"https://github.com/willfurnass","followers_url":"https://api.github.com/users/willfurnass/followers","following_url":"https://api.github.com/users/willfurnass/following{/other_user}","gists_url":"https://api.github.com/users/willfurnass/gists{/gist_id}","starred_url":"https://api.github.com/users/willfurnass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willfurnass/subscriptions","organizations_url":"https://api.github.com/users/willfurnass/orgs","repos_url":"https://api.github.com/users/willfurnass/repos","events_url":"https://api.github.com/users/willfurnass/events{/privacy}","received_events_url":"https://api.github.com/users/willfurnass/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T09:19:48Z","updated_at":"2015-04-08T09:19:48Z","body":"Is there any interest in supporting `numpy.seterr` and the `numpy.errstate` context manager (or equivalents) in pandas?  Could be useful to force exceptions to be raised in situations where you really don't want NaNs or don't want inf values from things being divided by zero.  If not, then perhaps a note should be added to the docs explaining that anything other than the default numpy error handling will cause problems with pandas."}}