When to use sort_index and sort_value on series?

Hi. My query is simple , for data cleaning purposes, when to use sort_index and sort_value on series? I can’t think to find use of index sorting. One of the missions asks us to do that and I thought sorting by values makes more sense to observe the patterns

There is no definitive answer to this, as per me, because it depends on your data itself.

In some cases sorting by the index would make more sense than sorting by values and vice-versa.

Maybe your index is a bunch of dates, then sorting by index makes sense if you want to try and find a pattern over a period of time.

Maybe time is not a feature of interest, then sorting by values for a specific column would make more sense.

This is really something that you develop an intuition for once you analyze more and more data, as per me. And experimentation and exploration are as much a part of it.

Also note that the content is not necessarily going to be an absolute truth in terms of what you can or can not do with your analysis or what the best approach might be for a given situation. If something makes more sense to you, explore it and come to your own conclusion as well.

sure, thanks for the response.