'sort' method sorts one column only
{'login': 'shachardon', 'id': 42108562, 'node_id': 'MDQ6VXNlcjQyMTA4NTYy', 'avatar_url': 'https://avatars.githubusercontent.com/u/42108562?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/shachardon', 'html_url': 'https://github.com/shachardon', 'followers_url': 'https://api.github.com/users/shachardon/followers', 'following_url': 'https://api.github.com/users/shachardon/following{/other_user}', 'gists_url': 'https://api.github.com/users/shachardon/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/shachardon/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/shachardon/subscriptions', 'organizations_url': 'https://api.github.com/users/shachardon/orgs', 'repos_url': 'https://api.github.com/users/shachardon/repos', 'events_url': 'https://api.github.com/users/shachardon/events{/privacy}', 'received_events_url': 'https://api.github.com/users/shachardon/received_events', 'type': 'User', 'site_admin': False}
[]
[]
['Hi ! `ds.sort()` does sort the full dataset, not just one column:\r\n```python\r\nfrom datasets import *\r\n\r\nds = Dataset.from_dict({"foo": [3, 2, 1], "bar": ["c", "b", "a"]})\r\nprint(d.sort("foo").to_pandas()\r\n#    foo bar\r\n# 0    1   a\r\n# 1    2   b\r\n# 2    3   c\r\n```\r\n\r\nWhat made you think it was not the case ? Did you experience a situation where it was only sorting one column ?'
 'Hi! thank you for your quick reply!\r\nI wanted to sort the `cnn_dailymail` dataset by the length of the labels (num of characters). I added a new column to the dataset (`ds.add_column`) with the lengths and then sorted by this new column. Only the new length column was sorted, the reset left in their original order. '
 "That's unexpected, can you share the code you used to get this ?"]
The 'sort' method changes the order of one column only (the one defined by the argument 'column'), thus creating a mismatch between a sample fields. I would expect it to change the order of the samples as a whole, based on the 'column' order.
{'url': 'https://api.github.com/repos/huggingface/datasets/issues/4632/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}