@@ -19,7 +19,11 @@ def generate_symbol(lib, sym):
19
19
lib .write (sym , df0 )
20
20
lib .append (sym , df1 )
21
21
expected_column_stats = lib .read_index (sym )
22
- expected_column_stats .drop (expected_column_stats .columns .difference (["start_index" , "end_index" ]), 1 , inplace = True )
22
+ expected_column_stats .drop (
23
+ expected_column_stats .columns .difference (["start_index" , "end_index" ]),
24
+ axis = 1 ,
25
+ inplace = True ,
26
+ )
23
27
expected_column_stats = expected_column_stats .iloc [[0 , 1 ]]
24
28
expected_column_stats ["v1.0_MIN(col_1)" ] = [df0 ["col_1" ].min (), df1 ["col_1" ].min ()]
25
29
expected_column_stats ["v1.0_MAX(col_1)" ] = [df0 ["col_1" ].max (), df1 ["col_1" ].max ()]
@@ -41,7 +45,7 @@ def test_column_stats_basic_flow(lmdb_version_store_tiny_segment):
41
45
expected_column_stats = generate_symbol (lib , sym )
42
46
expected_column_stats .drop (
43
47
expected_column_stats .columns .difference (["start_index" , "end_index" , "v1.0_MIN(col_1)" , "v1.0_MAX(col_1)" ]),
44
- 1 ,
48
+ axis = 1 ,
45
49
inplace = True ,
46
50
)
47
51
@@ -74,7 +78,11 @@ def test_column_stats_infinity(lmdb_version_store_tiny_segment):
74
78
lib .append (sym , df1 )
75
79
lib .append (sym , df2 )
76
80
expected_column_stats = lib .read_index (sym )
77
- expected_column_stats .drop (expected_column_stats .columns .difference (["start_index" , "end_index" ]), 1 , inplace = True )
81
+ expected_column_stats .drop (
82
+ expected_column_stats .columns .difference (["start_index" , "end_index" ]),
83
+ axis = 1 ,
84
+ inplace = True ,
85
+ )
78
86
expected_column_stats = expected_column_stats .iloc [[0 , 1 , 2 ]]
79
87
expected_column_stats ["v1.0_MIN(col_1)" ] = [df0 ["col_1" ].min (), df1 ["col_1" ].min (), df2 ["col_1" ].min ()]
80
88
expected_column_stats ["v1.0_MAX(col_1)" ] = [df0 ["col_1" ].max (), df1 ["col_1" ].max (), df2 ["col_1" ].max ()]
@@ -94,7 +102,7 @@ def test_column_stats_as_of(lmdb_version_store_tiny_segment):
94
102
expected_column_stats = expected_column_stats .iloc [[0 ]]
95
103
expected_column_stats .drop (
96
104
expected_column_stats .columns .difference (["start_index" , "end_index" , "v1.0_MIN(col_1)" , "v1.0_MAX(col_1)" ]),
97
- 1 ,
105
+ axis = 1 ,
98
106
inplace = True ,
99
107
)
100
108
@@ -150,7 +158,7 @@ def test_column_stats_multiple_indexes_different_columns(lmdb_version_store_tiny
150
158
151
159
expected_column_stats .drop (
152
160
expected_column_stats .columns .difference (["start_index" , "end_index" , "v1.0_MIN(col_1)" , "v1.0_MAX(col_1)" ]),
153
- 1 ,
161
+ axis = 1 ,
154
162
inplace = True ,
155
163
)
156
164
column_stats = lib .read_column_stats (sym )
@@ -251,7 +259,7 @@ def test_column_stats_multiple_creates(lmdb_version_store_tiny_segment):
251
259
expected_column_stats = base_expected_column_stats .copy ()
252
260
expected_column_stats .drop (
253
261
expected_column_stats .columns .difference (["start_index" , "end_index" , "v1.0_MIN(col_1)" , "v1.0_MAX(col_1)" ]),
254
- 1 ,
262
+ axis = 1 ,
255
263
inplace = True ,
256
264
)
257
265
column_stats = lib .read_column_stats (sym )
@@ -287,10 +295,14 @@ def test_column_stats_duplicated_primary_index(lmdb_version_store_tiny_segment):
287
295
lib = lmdb_version_store_tiny_segment
288
296
sym = "test_column_stats_duplicated_primary_index"
289
297
290
- total_df = df0 . append ( df1 )
298
+ total_df = pd . concat (( df0 , df1 ) )
291
299
lib .write (sym , total_df )
292
300
expected_column_stats = lib .read_index (sym )
293
- expected_column_stats .drop (expected_column_stats .columns .difference (["start_index" , "end_index" ]), 1 , inplace = True )
301
+ expected_column_stats .drop (
302
+ expected_column_stats .columns .difference (["start_index" , "end_index" ]),
303
+ axis = 1 ,
304
+ inplace = True ,
305
+ )
294
306
expected_column_stats = expected_column_stats .iloc [[0 , 1 ]]
295
307
expected_column_stats ["v1.0_MIN(col_1)" ] = [df0 ["col_1" ].min (), df1 ["col_1" ].min ()]
296
308
expected_column_stats ["v1.0_MAX(col_1)" ] = [df0 ["col_1" ].max (), df1 ["col_1" ].max ()]
@@ -324,7 +336,11 @@ def test_column_stats_dynamic_schema_missing_data(lmdb_version_store_tiny_segmen
324
336
df = lib .read (sym ).data
325
337
326
338
expected_column_stats = lib .read_index (sym )
327
- expected_column_stats .drop (expected_column_stats .columns .difference (["start_index" , "end_index" ]), 1 , inplace = True )
339
+ expected_column_stats .drop (
340
+ expected_column_stats .columns .difference (["start_index" , "end_index" ]),
341
+ axis = 1 ,
342
+ inplace = True ,
343
+ )
328
344
expected_column_stats = expected_column_stats .iloc [[0 , 1 , 2 , 3 , 4 ]]
329
345
expected_column_stats ["v1.0_MIN(col_1)" ] = [
330
346
df0 ["col_1" ].min (),
@@ -395,7 +411,11 @@ def test_column_stats_dynamic_schema_types_changing(lmdb_version_store_tiny_segm
395
411
lib .append (sym , df1 )
396
412
397
413
expected_column_stats = lib .read_index (sym )
398
- expected_column_stats .drop (expected_column_stats .columns .difference (["start_index" , "end_index" ]), 1 , inplace = True )
414
+ expected_column_stats .drop (
415
+ expected_column_stats .columns .difference (["start_index" , "end_index" ]),
416
+ axis = 1 ,
417
+ inplace = True ,
418
+ )
399
419
expected_column_stats = expected_column_stats .iloc [[0 , 1 ]]
400
420
expected_column_stats ["v1.0_MIN(int_widening)" ] = [df0 ["int_widening" ].min (), df1 ["int_widening" ].min ()]
401
421
expected_column_stats ["v1.0_MAX(int_widening)" ] = [df0 ["int_widening" ].max (), df1 ["int_widening" ].max ()]
0 commit comments