Skip to content

Commit 997f50d

Browse files
committed
fix pre-commit
1 parent 597b516 commit 997f50d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pandas/tests/indexing/test_loc.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2974,10 +2974,11 @@ def test_loc_periodindex_3_levels():
29742974
@pytest.mark.parametrize("utc", [False, True])
29752975
def test_loc_datetime_assignment_dtype_does_not_change(utc):
29762976
# GH#49837
2977-
df = pd.DataFrame(
2977+
df = DataFrame(
29782978
{
2979-
# Checking with and without UTC as the original bug didn't occur with utc=True
2980-
"date": pd.to_datetime(
2979+
# Checking with and without UTC as the original bug didn't occur
2980+
# for utc=True
2981+
"date": to_datetime(
29812982
[datetime(2022, 1, 20), datetime(2022, 1, 22)], utc=utc
29822983
),
29832984
"update": [True, False],
@@ -2987,7 +2988,7 @@ def test_loc_datetime_assignment_dtype_does_not_change(utc):
29872988
expected = df.copy(deep=True)
29882989

29892990
update_df = df[df["update"]]
2990-
df.loc[df["update"], ["date"]] = update_df["date"])
2991+
df.loc[df["update"], ["date"]] = update_df["date"]
29912992

29922993
tm.assert_frame_equal(df, expected)
29932994

0 commit comments

Comments
 (0)