@@ -3049,31 +3049,23 @@ def test_comment_skiprows(self):
3049
3049
tm .assert_almost_equal (df .values , expected )
3050
3050
3051
3051
def test_trailing_spaces (self ):
3052
- data = """A B C
3053
- random line with trailing spaces
3054
- skip
3055
- 1,2,3
3056
- 1,2.,4.
3057
- random line with trailing tabs\t \t \t
3058
-
3059
- 5.1,NaN,10.0
3060
- """
3052
+ data = "A B C \n random line with trailing spaces \n skip\n 1,2,3\n 1,2.,4.\n random line with trailing tabs\t \t \t \n \n 5.1,NaN,10.0\n "
3061
3053
expected = pd .DataFrame ([[1. , 2. , 4. ],
3062
3054
[5.1 , np .nan , 10. ]])
3063
- # this should ignore six lines including lines with trailing
3055
+ # this should ignore six lines including lines with trailing
3064
3056
# whitespace and blank lines. issues 8661, 8679
3065
- df = self .read_csv (StringIO (data .replace (',' , ' ' )),
3057
+ df = self .read_csv (StringIO (data .replace (',' , ' ' )),
3066
3058
header = None , delim_whitespace = True ,
3067
3059
skiprows = [0 ,1 ,2 ,3 ,5 ,6 ], skip_blank_lines = True )
3068
3060
tm .assert_frame_equal (df , expected )
3069
- df = self .read_table (StringIO (data .replace (',' , ' ' )),
3061
+ df = self .read_table (StringIO (data .replace (',' , ' ' )),
3070
3062
header = None , delim_whitespace = True ,
3071
3063
skiprows = [0 ,1 ,2 ,3 ,5 ,6 ], skip_blank_lines = True )
3072
3064
tm .assert_frame_equal (df , expected )
3073
3065
# test skipping set of rows after a row with trailing spaces, issue #8983
3074
- expected = pd .DataFrame ({"A" :[1. , 5.1 ], "B" :[2. , np .nan ],
3066
+ expected = pd .DataFrame ({"A" :[1. , 5.1 ], "B" :[2. , np .nan ],
3075
3067
"C" :[4. , 10 ]})
3076
- df = self .read_table (StringIO (data .replace (',' , ' ' )),
3068
+ df = self .read_table (StringIO (data .replace (',' , ' ' )),
3077
3069
delim_whitespace = True ,
3078
3070
skiprows = [1 ,2 ,3 ,5 ,6 ], skip_blank_lines = True )
3079
3071
tm .assert_frame_equal (df , expected )
@@ -3265,6 +3257,7 @@ def test_compact_ints(self):
3265
3257
3266
3258
def test_precise_conversion (self ):
3267
3259
# GH #8002
3260
+ tm ._skip_if_32bit ()
3268
3261
from decimal import Decimal
3269
3262
normal_errors = []
3270
3263
precise_errors = []
0 commit comments