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

Avoid FutureWarning that can arise from index dtype inference #9575

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions dask/dataframe/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def _mul_cols(df, cols):
# Fix index in a groupby().apply() context
# https://github.com/dask/dask/issues/8137
# https://github.com/pandas-dev/pandas/issues/43568
_df.index = [0] * len(_df)
_df.index = pd.Index([0] * len(_df), dtype="int")
return _df


Expand Down Expand Up @@ -634,7 +634,7 @@ def _drop_duplicates_reindex(df):
# https://github.com/dask/dask/issues/8137
# https://github.com/pandas-dev/pandas/issues/43568
result = df.drop_duplicates()
result.index = [0] * len(result)
result.index = pd.Index([0] * len(result), dtype="int")
return result


Expand Down