pytimetk icon indicating copy to clipboard operation
pytimetk copied to clipboard

Inconsistent sorting - make more obvious

Open mdancho84 opened this issue 1 year ago • 2 comments

Thinking of adding a sort parameter to these functions to make it more obvious to what's happening under the hood.

One issue is that when sorting, the order of the groups are changing. So maybe make this optional.

mdancho84 avatar Feb 09 '24 18:02 mdancho84

Switched from using data.apply(lambda x: x) to data.obj.copy(). The former sorts groups alphabetically. The latter maintains the order of the original data.

mdancho84 avatar Feb 10 '24 01:02 mdancho84

Next on my list is to tackle these. Make them optional with sort = True as default.

 df.sort_values(by=[*group_names, date_column], inplace=True)

mdancho84 avatar Feb 10 '24 02:02 mdancho84