We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0aab39d commit f6ddc89Copy full SHA for f6ddc89
pandas/tests/frame/test_api.py
@@ -263,12 +263,12 @@ def test_itertuples(self, float_frame):
263
df3 = DataFrame({"f" + str(i): [i] for i in range(1024)})
264
# will raise SyntaxError if trying to create namedtuple
265
tup3 = next(df3.itertuples())
266
- assert not hasattr(tup3, "_fields")
267
- assert isinstance(tup3, tuple)
+ if PY37:
+ assert not hasattr(tup3, "_fields")
268
+ else:
269
+ assert hasattr(tup3, "_fields")
270
- def test_itertuples_fallback_to_regular_tuples(self):
271
# GH 28282
-
272
df_254_columns = DataFrame([{f"foo_{i}": f"bar_{i}" for i in range(254)}])
273
result_254_columns = next(df_254_columns.itertuples(index=False))
274
assert isinstance(result_254_columns, tuple)
0 commit comments