{"issue":{"state":"open","created_at":"2011-12-01T12:45:27Z","updated_at":"2011-12-06T01:24:07Z","user":{"gravatar_id":"7c6c961a2114495b25d5f59ca50a7931","id":382887,"url":"https://api.github.com/users/rennerocha","login":"rennerocha","avatar_url":"https://secure.gravatar.com/avatar/7c6c961a2114495b25d5f59ca50a7931?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":5,"body":"Adding order_by='<header_name>' parameter to Table.","assignee":null,"id":2414123,"number":2,"pull_request":{"patch_url":"https://github.com/turicas/outputty/pull/2.patch","html_url":"https://github.com/turicas/outputty/pull/2","diff_url":"https://github.com/turicas/outputty/pull/2.diff"},"labels":[],"title":"Feature/order by","html_url":"https://github.com/turicas/outputty/issues/2","closed_at":null,"url":"https://api.github.com/repos/turicas/outputty/issues/2","milestone":null},"action":"created","comment":{"created_at":"2011-12-06T01:24:07Z","updated_at":"2011-12-06T01:24:07Z","user":{"gravatar_id":"7c6c961a2114495b25d5f59ca50a7931","id":382887,"url":"https://api.github.com/users/rennerocha","login":"rennerocha","avatar_url":"https://secure.gravatar.com/avatar/7c6c961a2114495b25d5f59ca50a7931?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"I agree with you that the better way when we import data from a CSV file is try to \"discover\" the right data type, because it is very common that a column of int or floats to be represented as quoted strings instead of numbers.\r\n\r\nBut in the second case with `my_table.rows.append(...)`, I can think a third possible behaviour: one can expect the same as the sort method, ordering first numbers and then the strings:\r\n\r\n    >>> c = ['5', 61, '42']\r\n    >>> c.sort()\r\n    >>> c\r\n    [61, '42', '5']\r\n\r\nI see three ways to solve this problem before sorting:\r\n\r\n1. Try to convert the appended data to int/float (my favorite!);\r\n2. Convert all appended data to string;\r\n3. Let string and int mixed and order as the sort method.\r\n\r\nWhat do you prefer?","id":3026715,"url":"https://api.github.com/repos/turicas/outputty/issues/comments/3026715"}}