File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -42,5 +42,5 @@ def __getitem__(self, key: str):
4242        xarray Dataset of the data associated with key 
4343        """ 
4444
45-         col_name  =  cfp .match_criteria_key (self ._obj .columns .values , key )
45+         col_name  =  cfp .match_criteria_key (self ._obj .columns .values , key ,  split = True )
4646        return  self ._obj [col_name ]
Original file line number Diff line number Diff line change @@ -21,10 +21,16 @@ def test_options():
2121
2222def  test_match_criteria_key_accessor ():
2323
24-     vals  =  ["wind_speed" , "WIND_SPEED" , "wind_speed_status" ]
25- 
26-     df  =  pd .DataFrame (columns = ["temp" , "wind_speed" ])
24+     df  =  pd .DataFrame (
25+         columns = [
26+             "temp" ,
27+             "wind_speed" ,
28+             "wind_speed (m/s)" ,
29+             "WIND_SPEED" ,
30+             "wind_speed_status" ,
31+         ]
32+     )
2733
2834    # test accessor with set_options criteria 
2935    with  cfp .set_options (custom_criteria = criteria ):
30-         assert  df .cf ["wind_s" ].columns  ==  ["wind_speed" ]
36+         assert  sorted ( df .cf ["wind_s" ].columns )  ==  ["wind_speed"  ,  "wind_speed (m/s) "
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments