Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Make __iter__ a fast-slow attribute of the pd.Series proxy type #17168

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion python/cudf/cudf/pandas/_wrappers/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ def custom_repr_html(obj):
"__array_ufunc__": _FastSlowAttribute("__array_ufunc__"),
"__arrow_array__": arrow_array_method,
"__cuda_array_interface__": cuda_array_interface,
"__iter__": custom_iter,
"dt": _AccessorAttr(CombinedDatetimelikeProperties),
"str": _AccessorAttr(StringMethods),
"cat": _AccessorAttr(_CategoricalAccessor),
Expand Down
8 changes: 8 additions & 0 deletions python/cudf/cudf_pandas_tests/test_cudf_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,14 @@ def test_itertuples():
assert result._fields == expected._fields


def test_iteration_over_dataframe_dtypes_produces_proxy_objects(dataframe):
_, xdf = dataframe
xdf["b"] = xpd.IntervalIndex.from_arrays(xdf["a"], xdf["b"])
xdf["a"] = xdf["a"].astype("category")
for x in xdf.dtypes:
assert is_proxy_object(x)


def test_namedagg_namedtuple():
df = xpd.DataFrame(
{
Expand Down
Loading