Skip to content

Sorting Values in Dataframe #12

Answered by diffrxction
NeelaGitH asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @NeelaGitH sorry for the late response!

Here, it appears you were asked to firstly sort the values by the index associated with price which is why the sort_index() method is correct. If you were using sort_values() that didn't work mostly because you had to sort one specific index in ascending order and the sort_values() function does not do so as intended.

To further understand my point I would recommend trying to download this dataset into your local system and printing out the two results when using sort_values() and sort_index() respectively.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by NeelaGitH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants