We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 045e068 commit 19ddf0dCopy full SHA for 19ddf0d
asv_bench/benchmarks/groupby.py
@@ -358,6 +358,21 @@ def time_category_size(self):
358
self.draws.groupby(self.cats).size()
359
360
361
+class FillNA:
362
+ def setup(self):
363
+ N = 1500
364
+ self.df = pd.DataFrame({
365
+ 'group' : [1] * N + [2] * N,
366
+ 'value' : [np.nan, 1.0] * N
367
+ }).set_index('group')
368
+
369
+ def time_df_ffill(self):
370
+ self.df.groupby('group').fillna(method='ffill')
371
372
+ def time_srs_ffill(self):
373
+ self.df.groupby('group')['value'].fillna(method='ffill')
374
375
376
class GroupByMethods:
377
378
param_names = ["dtype", "method", "application"]
0 commit comments