File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -185,3 +185,19 @@ def test_temporary_file(self):
185185 result = self .read_csv (new_file , sep = r"\s*" , header = None )
186186 expected = DataFrame ([[0 , 0 ]])
187187 tm .assert_frame_equal (result , expected )
188+
189+ def test_skipfooter_with_decimal (self ):
190+ # see gh-6971
191+ data = '1#2\n 3#4'
192+ expected = DataFrame ({'a' : [1.2 , 3.4 ]})
193+
194+ result = self .read_csv (StringIO (data ), names = ['a' ],
195+ decimal = '#' )
196+ tm .assert_frame_equal (result , expected )
197+
198+ # the stray footer line should not mess with the
199+ # casting of the first t wo lines if we skip it
200+ data = data + '\n Footer'
201+ result = self .read_csv (StringIO (data ), names = ['a' ],
202+ decimal = '#' , skipfooter = 1 )
203+ tm .assert_frame_equal (result , expected )
You can’t perform that action at this time.
0 commit comments