@@ -663,6 +663,7 @@ def test_append_with_data_columns(self):
663
663
664
664
with ensure_clean (self .path ) as store :
665
665
df = tm .makeTimeDataFrame ()
666
+ df .loc [:,'B' ].iloc [0 ] = 1.
666
667
store .remove ('df' )
667
668
store .append ('df' , df [:2 ], data_columns = ['B' ])
668
669
store .append ('df' , df [2 :])
@@ -726,6 +727,8 @@ def check_col(key,name,size):
726
727
with ensure_clean (self .path ) as store :
727
728
# multiple data columns
728
729
df_new = df .copy ()
730
+ df_new .loc [:,'A' ].iloc [0 ] = 1.
731
+ df_new .loc [:,'B' ].iloc [0 ] = - 1.
729
732
df_new ['string' ] = 'foo'
730
733
df_new ['string' ][1 :4 ] = np .nan
731
734
df_new ['string' ][5 :6 ] = 'bar'
@@ -743,9 +746,9 @@ def check_col(key,name,size):
743
746
744
747
# yield an empty frame
745
748
result = store .select ('df' , [Term ('string' , '=' , 'foo' ), Term (
746
- 'string2=bar' ), Term ( 'A>0' ), Term ( 'B<0 ' )])
749
+ 'string2=cool ' )])
747
750
expected = df_new [(df_new .string == 'foo' ) & (
748
- df_new .string2 == 'bar' ) & ( df_new . A > 0 ) & ( df_new . B < 0 )]
751
+ df_new .string2 == 'cool' )]
749
752
tm .assert_frame_equal (result , expected )
750
753
751
754
with ensure_clean (self .path ) as store :
0 commit comments