Skip to content

Commit 590396d

Browse files
committed
TST: Remove unused imports.
1 parent b59d6b8 commit 590396d

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed
+10-19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import numpy as np
2-
import pytest
3-
41
import pandas as pd
52
import pandas._testing as tm
63

@@ -9,25 +6,19 @@ class TestMap:
96
def test_map(self):
107
# map test on StringDType, GH#40823
118
df1 = pd.DataFrame(
12-
{
13-
"col1": [pd.NA, "foo", "bar"]
14-
}, index=["id1", "id2", "id3"], dtype=pd.StringDtype()
9+
{"col1": [pd.NA, "foo", "bar"]},
10+
index=["id1", "id2", "id3"],
11+
dtype=pd.StringDtype(),
1512
)
1613

17-
df2 = pd.DataFrame(
18-
{
19-
"id": ["id4", "id2", "id1"]
20-
}, dtype=pd.StringDtype()
21-
)
22-
14+
df2 = pd.DataFrame({"id": ["id4", "id2", "id1"]}, dtype=pd.StringDtype())
15+
2316
df2["col1"] = df2["id"].map(df1["col1"])
24-
17+
2518
result = df2
2619
expected = pd.DataFrame(
27-
{
28-
"id": ["id4", "id2", "id1"],
29-
"col1": [pd.NA, "foo", pd.NA]
30-
}, dtype=pd.StringDtype()
20+
{"id": ["id4", "id2", "id1"], "col1": [pd.NA, "foo", pd.NA]},
21+
dtype=pd.StringDtype(),
3122
)
32-
33-
tm.assert_frame_equal(result, expected)
23+
24+
tm.assert_frame_equal(result, expected)

0 commit comments

Comments
 (0)