Skip to content

Commit a28bfad

Browse files
committed
TST/CLN: test comments
1 parent 6b8221c commit a28bfad

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

pandas/tests/frame/methods/test_to_dict.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -257,18 +257,19 @@ def test_to_dict_wide(self):
257257
assert result == expected
258258

259259
def test_to_dict_orient_dtype(self):
260-
# GH#22620
261-
# Input Data
262-
input_data = {
263-
"a": [1, 2, 3],
264-
"b": [1.0, 2.0, 3.0],
265-
"c": ["X", "Y", "Z"],
266-
"d": [datetime(2018, 1, 1), datetime(2019, 2, 2), datetime(2020, 3, 3)],
267-
}
268-
df = DataFrame(input_data)
269-
# Expected Dtypes
260+
# GH22620 & GH21256
261+
262+
df = DataFrame(
263+
{
264+
"a": [1, 2, 3],
265+
"b": [1.0, 2.0, 3.0],
266+
"c": ["X", "Y", "Z"],
267+
"d": [datetime(2018, 1, 1), datetime(2019, 2, 2), datetime(2020, 3, 3)],
268+
}
269+
)
270+
270271
expected = {"a": int, "b": float, "c": str, "d": datetime}
271-
# Extracting dtypes out of to_dict operation
272+
272273
for df_dict in df.to_dict("records"):
273274
result = {
274275
"a": type(df_dict["a"]),

0 commit comments

Comments
 (0)