Skip to content

Commit 0602556

Browse files
committed
Formatting
1 parent 3e5ec56 commit 0602556

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pandas/io/parsers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ def _convert_to_ndarrays(self, dct, na_values, na_fvalues, verbose=False,
16621662
else:
16631663
# skip inference if specified dtype is object
16641664
try_num_bool = not (cast_type and (is_string_dtype(cast_type)
1665-
or is_extension_array_dtype(cast_type)))
1665+
or is_extension_array_dtype(cast_type))) # noqa
16661666

16671667
# general type inference and conversion
16681668
cvals, na_count = self._infer_types(
@@ -1671,7 +1671,7 @@ def _convert_to_ndarrays(self, dct, na_values, na_fvalues, verbose=False,
16711671

16721672
# type specified in dtype param
16731673
if cast_type and (not is_dtype_equal(cvals, cast_type)
1674-
or is_extension_array_dtype(cast_type)):
1674+
or is_extension_array_dtype(cast_type)):
16751675
cvals = self._cast_types(cvals, cast_type, c)
16761676

16771677
result[c] = cvals

pandas/tests/extension/base/io.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
import pytest
12
import pandas as pd
3+
import numpy as np
24
from pandas.compat import StringIO
35
from pandas.core.arrays.integer import (
46
Int8Dtype, Int16Dtype, Int32Dtype, Int64Dtype, UInt8Dtype, UInt16Dtype,
5-
UInt32Dtype, UInt64Dtype)
7+
UInt32Dtype, UInt64Dtype, integer_array,
8+
)
69
from .base import BaseExtensionTests
710

11+
812
def make_data():
913
return (list(range(1, 9)) + [np.nan] + list(range(10, 98))
1014
+ [np.nan] + [99, 100])
@@ -20,6 +24,7 @@ def dtype(request):
2024
def data(dtype):
2125
return integer_array(make_data(), dtype=dtype)
2226

27+
2328
class ExtensionParsingTests(BaseExtensionTests):
2429
def test_EA_types(self):
2530
df = pd.DataFrame({'Int': pd.Series([1, 2, 3], dtype='Int64'),

0 commit comments

Comments
 (0)