File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ def interpolated_df(self):
140140 .reset_index ()
141141 )
142142 df ["value" ] = df ["value" ].fillna (0 )
143- df ["rank" ] = df .groupby ("date" )["value" ].rank (method = "dense " , ascending = False )
143+ df ["rank" ] = df .groupby ("date" )["value" ].rank (method = "first " , ascending = False )
144144 if "category" in self .df .columns :
145145 mapper = self .name_to_category ()
146146 df ["category" ] = df ["name" ].apply (lambda name : mapper .get (name ))
@@ -207,7 +207,7 @@ def values_by_date(self):
207207 last = last [~ last .name .isin (grouped ["name" ])]
208208 if last .shape [0 ] > 0 :
209209 last ["rank" ] = (
210- last ["value" ].rank (method = "dense " , ascending = False )
210+ last ["value" ].rank (method = "first " , ascending = False )
211211 + grouped [grouped ["value" ] > 0 ]["rank" ].max ()
212212 )
213213 last ["value" ] = 0.0
You can’t perform that action at this time.
0 commit comments