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

Support kw only arguments for frame methods for Pandas 2 #28454

Merged
merged 30 commits into from
Sep 18, 2023

Conversation

caneff
Copy link
Contributor

@caneff caneff commented Sep 14, 2023

Pandas 2 turns most args of most of its methods into kwonly args.

args_to_kwargs and populate_defaults needed to be changed to look there, and there were a few locations that called pandas methods by location only that had to be updated to call by keyword.

Partially fixes #27221.

caneff and others added 27 commits September 8, 2023 14:40
Level was always NotImplemented anyway, and errors I conditionally disable based on the pandas version to keep functionality.
Pandas removed .append in 2.0 so this helps keep the API consistent.
Pandas 2 has made most args of most methods kw only. This still supports
Pandas 1 while allowing for those.
@caneff
Copy link
Contributor Author

caneff commented Sep 14, 2023

R: @tvalentyn

@github-actions
Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

@caneff
Copy link
Contributor Author

caneff commented Sep 14, 2023

Run Python_Coverage PreCommit

@caneff
Copy link
Contributor Author

caneff commented Sep 14, 2023

Run Python_Runners PreCommit

@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Merging #28454 (a5c3a0e) into master (108680a) will decrease coverage by 0.01%.
Report is 48 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #28454      +/-   ##
==========================================
- Coverage   72.34%   72.34%   -0.01%     
==========================================
  Files         683      683              
  Lines      100708   100715       +7     
==========================================
+ Hits        72858    72859       +1     
- Misses      26273    26279       +6     
  Partials     1577     1577              
Flag Coverage Δ
python 82.83% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
sdks/python/apache_beam/dataframe/frames.py 95.37% <ø> (ø)
sdks/python/apache_beam/dataframe/frame_base.py 89.45% <100.00%> (+0.20%) ⬆️

... and 9 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@caneff caneff requested a review from tvalentyn September 15, 2023 17:25
@tvalentyn
Copy link
Contributor

Run Python PreCommit

@tvalentyn
Copy link
Contributor

Run Python_Runners PreCommit

@caneff caneff requested a review from tvalentyn September 18, 2023 19:13
@tvalentyn
Copy link
Contributor

Run Python PreCommit

@tvalentyn tvalentyn merged commit a722740 into apache:master Sep 18, 2023
3 checks passed
@caneff caneff deleted the kw_only branch September 21, 2023 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Pandas==2.x in Apache Beam.
2 participants