|
15 | 15 |
|
16 | 16 | from pandas._config import using_string_dtype |
17 | 17 |
|
| 18 | +from pandas._libs import parsers as libparsers |
18 | 19 | from pandas.compat import HAS_PYARROW |
19 | 20 | from pandas.errors import ( |
20 | 21 | EmptyDataError, |
|
28 | 29 | compat, |
29 | 30 | ) |
30 | 31 | import pandas._testing as tm |
31 | | -from pandas._libs import parsers as libparsers |
32 | 32 |
|
33 | 33 | pytestmark = pytest.mark.filterwarnings( |
34 | 34 | "ignore:Passing a BlockManager to DataFrame:DeprecationWarning" |
@@ -832,11 +832,12 @@ def test_read_seek(all_parsers): |
832 | 832 | expected = parser.read_csv(StringIO(content)) |
833 | 833 | tm.assert_frame_equal(actual, expected) |
834 | 834 |
|
| 835 | + |
835 | 836 | def test_dtype_conversion_in_sanitization(): |
836 | 837 | # GH60088 |
837 | | - values = np.array([1,True],dtype=object) |
838 | | - expected = np.array([1,True],dtype=object) |
839 | | - libparsers.sanitize_objects(values,na_values=set()) |
840 | | - for v,e in zip(values,expected): |
841 | | - assert v==e |
842 | | - assert type(v)==type(e) |
| 838 | + values = np.array([1, True], dtype=object) |
| 839 | + expected = np.array([1, True], dtype=object) |
| 840 | + libparsers.sanitize_objects(values, na_values=set()) |
| 841 | + for v, e in zip(values, expected): |
| 842 | + assert v == e |
| 843 | + assert type(v) == type(e) |
0 commit comments