File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -862,4 +862,28 @@ def time_last_valid_index(self, dtype):
862
862
self .df .last_valid_index ()
863
863
864
864
865
+ class Update :
866
+ def setup (self ):
867
+ rng = np .random .default_rng ()
868
+ self .df = DataFrame (rng .uniform (size = (1_000_000 , 10 )))
869
+
870
+ idx = rng .choice (range (1_000_000 ), size = 1_000_000 , replace = False )
871
+ self .df_random = DataFrame (self .df , index = idx )
872
+
873
+ idx = rng .choice (range (1_000_000 ), size = 100_000 , replace = False )
874
+ cols = rng .choice (range (10 ), size = 2 , replace = False )
875
+ self .df_sample = DataFrame (
876
+ rng .uniform (size = (100_000 , 2 )), index = idx , columns = cols
877
+ )
878
+
879
+ def time_to_update_big_frame_small_arg (self ):
880
+ self .df .update (self .df_sample )
881
+
882
+ def time_to_update_random_indices (self ):
883
+ self .df_random .update (self .df_sample )
884
+
885
+ def time_to_update_small_frame_big_arg (self ):
886
+ self .df_sample .update (self .df )
887
+
888
+
865
889
from .pandas_vb_common import setup # noqa: F401 isort:skip
You can’t perform that action at this time.
0 commit comments