MCPcopy
hub / github.com/pandas-dev/pandas / test_items

Method test_items

pandas/tests/frame/test_iteration.py:29–36  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

27 assert isinstance(v, DataFrame._constructor_sliced)
28
29 def test_items(self):
30 # GH#17213, GH#13918
31 cols = ["a", "b", "c"]
32 df = DataFrame([[1, 2, 3], [4, 5, 6]], columns=cols)
33 for c, (k, v) in zip(cols, df.items()):
34 assert c == k
35 assert isinstance(v, Series)
36 assert (df[k] == v).all()
37
38 def test_items_names(self, float_string_frame):
39 for k, v in float_string_frame.items():

Callers

nothing calls this directly

Calls 3

itemsMethod · 0.95
DataFrameClass · 0.90
allMethod · 0.45

Tested by

no test coverage detected