{"comment":{"created_at":"2011-10-14T19:58:45Z","body":"@PhE you probably have to call buf.seek(0) before readlines()","updated_at":"2011-10-14T19:58:45Z","url":"https://api.github.com/repos/wesm/pandas/issues/comments/2410763","id":2410763,"user":{"avatar_url":"https://secure.gravatar.com/avatar/673a112cceaf8a4714ac6c3b6ae91690?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"673a112cceaf8a4714ac6c3b6ae91690","url":"https://api.github.com/users/brentp","id":1739,"login":"brentp"}},"action":"created","issue":{"number":232,"created_at":"2011-10-13T16:11:54Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"DataFrame.to_string() is printing directly to console and not returning a string :\r\n\r\n```Python\r\n>>> import pandas\r\n>>> df = pandas.DataFrame(range(5))\r\n>>> df\r\n   0\r\n0  0\r\n1  1\r\n2  2\r\n3  3\r\n4  4\r\n>>> view_repr = repr(df)\r\n>>> view_to_string = df.to_string()\r\n   0\r\n0  0\r\n1  1\r\n2  2\r\n3  3\r\n4  4\r\n>>> view_repr == view_to_string\r\nFalse\r\n```\r\n\r\nFor large DataFrame, we have to use to_string() to get a tabular view.\r\nBut the return value is not set (None) and can't be retrieved :\r\n\r\n```Python\r\n>>> view_repr\r\n'   0\\n0  0\\n1  1\\n2  2\\n3  3\\n4  4\\n'\r\n>>> view_to_string\r\n>>>\r\n```\r\n\r\nIt would be usefull to get a string (or StringIO) returned by DataFrame.to_string()\r\n","comments":3,"title":"to_string() returning None","updated_at":"2011-10-14T19:58:45Z","url":"https://api.github.com/repos/wesm/pandas/issues/232","id":1901786,"assignee":null,"milestone":{"number":6,"created_at":"2011-10-10T01:38:02Z","due_on":"2011-10-31T07:00:00Z","title":"0.5 major release","creator":{"avatar_url":"https://secure.gravatar.com/avatar/2c08a3eed709a9d1a2654cea45aa466f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2c08a3eed709a9d1a2654cea45aa466f","url":"https://api.github.com/users/wesm","id":329591,"login":"wesm"},"url":"https://api.github.com/repos/wesm/pandas/milestones/6","open_issues":6,"closed_issues":10,"description":"","state":"open"},"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/80061d98e1ec601f49dc4cc02fbb5823?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"80061d98e1ec601f49dc4cc02fbb5823","url":"https://api.github.com/users/PhE","id":1107924,"login":"PhE"},"html_url":"https://github.com/wesm/pandas/issues/232","labels":[{"name":"Enhancement","url":"https://api.github.com/repos/wesm/pandas/labels/Enhancement","color":"02e10c"}],"state":"open"},"legacy":{"issue_id":1901786,"comment_id":2410763}}