Skip to content

Deprecate out= and dtype= parameter in most dataframe methods#10800

Merged
phofl merged 11 commits intodask:mainfrom
crusaderky:deprecate_reductions
Jan 15, 2024
Merged

Deprecate out= and dtype= parameter in most dataframe methods#10800
phofl merged 11 commits intodask:mainfrom
crusaderky:deprecate_reductions

Conversation

@crusaderky
Copy link
Copy Markdown
Collaborator

@crusaderky crusaderky commented Jan 15, 2024

NOT deprecated out parameter:

  • from_dict
  • to_sql
  • elementwise ufuncs (e.g. np.log)

@phofl
Copy link
Copy Markdown
Collaborator

phofl commented Jan 15, 2024

You could also use the _deprecated_kwarg decorator

@crusaderky crusaderky force-pushed the deprecate_reductions branch from 461c9f1 to eb1f69e Compare January 15, 2024 13:40
@crusaderky crusaderky self-assigned this Jan 15, 2024
@crusaderky crusaderky force-pushed the deprecate_reductions branch from c1ed0b2 to 83d1287 Compare January 15, 2024 14:15

if not isinstance(out, Scalar):
out._divisions = result.divisions
return result
Copy link
Copy Markdown
Collaborator Author

@crusaderky crusaderky Jan 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed from None to align to pandas behaviour.
Besides deprecated reductions, this applies to numpy ufuncs.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 15, 2024

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

     15 files  ±  0       15 suites  ±0   3h 42m 25s ⏱️ + 18m 41s
 12 940 tests + 20   11 520 ✅ ±  0     929 💤 ±0  491 ❌ +20 
160 317 runs  +240  142 936 ✅ +216  16 890 💤 +4  491 ❌ +20 

For more details on these failures, see this check.

Results for commit bd25bb6. ± Comparison against base commit 3b502f1.

This pull request removes 24 and adds 44 tests. Note that renamed tests count towards both.
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_out[max-frame0-0-out0]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_out[max-frame1-1-out1]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_out[max-frame2-None-None]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_out[mean-frame0-0-out0]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_out[mean-frame1-1-out1]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_out[mean-frame2-None-None]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_out[min-frame0-0-out0]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_out[min-frame1-1-out1]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_out[min-frame2-None-None]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_out[prod-frame0-0-out0]
…
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_numpy_dispatch[all-0]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_numpy_dispatch[all-1]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_numpy_dispatch[any-0]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_numpy_dispatch[any-1]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_numpy_dispatch[max-0]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_numpy_dispatch[max-1]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_numpy_dispatch[mean-0]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_numpy_dispatch[mean-1]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_numpy_dispatch[min-0]
dask.dataframe.tests.test_arithmetics_reduction ‑ test_reductions_numpy_dispatch[min-1]
…

♻️ This comment has been updated with latest results.

@crusaderky
Copy link
Copy Markdown
Collaborator Author

All failures unrelated. Ready for review.

@crusaderky crusaderky marked this pull request as ready for review January 15, 2024 18:47
Copy link
Copy Markdown
Collaborator

@phofl phofl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx

@phofl phofl added dataframe deprecation Something is being removed labels Jan 15, 2024
@phofl phofl merged commit 981c95b into dask:main Jan 15, 2024
@crusaderky crusaderky deleted the deprecate_reductions branch January 16, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dataframe deprecation Something is being removed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate legacy keywords from reductions

2 participants