@@ -328,7 +328,7 @@ def test_agg_consistency():
328
328
329
329
r = df .resample ("3min" )
330
330
331
- msg = r"Column \(s\) \['r1', 'r2'\] do not exist"
331
+ msg = r"Label \(s\) \['r1', 'r2'\] do not exist"
332
332
with pytest .raises (KeyError , match = msg ):
333
333
r .agg ({"r1" : "mean" , "r2" : "sum" })
334
334
@@ -343,7 +343,7 @@ def test_agg_consistency_int_str_column_mix():
343
343
344
344
r = df .resample ("3min" )
345
345
346
- msg = r"Column \(s\) \[2, 'b'\] do not exist"
346
+ msg = r"Label \(s\) \[2, 'b'\] do not exist"
347
347
with pytest .raises (KeyError , match = msg ):
348
348
r .agg ({2 : "mean" , "b" : "sum" })
349
349
@@ -534,7 +534,7 @@ def test_agg_with_lambda(cases, agg):
534
534
],
535
535
)
536
536
def test_agg_no_column (cases , agg ):
537
- msg = r"Column \(s\) \['result1', 'result2'\] do not exist"
537
+ msg = r"Label \(s\) \['result1', 'result2'\] do not exist"
538
538
with pytest .raises (KeyError , match = msg ):
539
539
cases [["A" , "B" ]].agg (** agg )
540
540
@@ -582,7 +582,7 @@ def test_agg_specificationerror_series(cases, agg):
582
582
def test_agg_specificationerror_invalid_names (cases ):
583
583
# errors
584
584
# invalid names in the agg specification
585
- msg = r"Column \(s\) \['B'\] do not exist"
585
+ msg = r"Label \(s\) \['B'\] do not exist"
586
586
with pytest .raises (KeyError , match = msg ):
587
587
cases [["A" ]].agg ({"A" : ["sum" , "std" ], "B" : ["mean" , "std" ]})
588
588
@@ -631,7 +631,7 @@ def test_try_aggregate_non_existing_column():
631
631
df = DataFrame (data ).set_index ("dt" )
632
632
633
633
# Error as we don't have 'z' column
634
- msg = r"Column \(s\) \['z'\] do not exist"
634
+ msg = r"Label \(s\) \['z'\] do not exist"
635
635
with pytest .raises (KeyError , match = msg ):
636
636
df .resample ("30min" ).agg ({"x" : ["mean" ], "y" : ["median" ], "z" : ["sum" ]})
637
637
0 commit comments