Skip to content

Commit 68dfd0e

Browse files
committed
formatting by pre-commit
1 parent e6cdec8 commit 68dfd0e

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

pandas/core/construction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ def sanitize_array(
612612
if dtype is None:
613613
subarr = data
614614
if data.dtype == object and infer_object:
615-
fltarr = data.ravel() # GH#61026
615+
fltarr = data.ravel() # GH#61026
616616
subarr = maybe_infer_to_datetimelike(fltarr).reshape(data.shape)
617617
elif data.dtype.kind == "U" and using_string_dtype():
618618
from pandas.core.arrays.string_ import StringDtype

pandas/tests/frame/indexing/test_setitem.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -815,18 +815,22 @@ def test_setitem_index_object_dtype_not_inferring(self):
815815
}
816816
)
817817
tm.assert_frame_equal(df, expected)
818-
818+
819819
def test_setitem_2d_object_array(self):
820820
# GH#61026
821-
df = DataFrame({
822-
"c1": [1, 2, 3, 4, 5],
823-
})
821+
df = DataFrame(
822+
{
823+
"c1": [1, 2, 3, 4, 5],
824+
}
825+
)
824826
arr = np.array([["A"], ["B"], ["C"], ["D"], ["E"]], dtype=object)
825827
df["c1"] = arr
826-
827-
expected = DataFrame({
828-
"c1": ["A", "B", "C", "D", "E"],
829-
})
828+
829+
expected = DataFrame(
830+
{
831+
"c1": ["A", "B", "C", "D", "E"],
832+
}
833+
)
830834
tm.assert_frame_equal(df, expected)
831835

832836

0 commit comments

Comments
 (0)