-
Notifications
You must be signed in to change notification settings - Fork 23
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
🎨 applymap depreceated since pandas 2.1 #186
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe changes involve simplifying the Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
sdrf_pipelines/sdrf/sdrf_schema.py (1)
364-369
: LGTM! Consider removing the commented code.The change to use
map
unconditionally is correct as it aligns with pandas' deprecation ofapplymap
since version 2.1.0. However, since the version-specific code is no longer needed, consider removing the commented code for cleaner maintenance.- # if sys.version_info <= (3, 8): - # # Use map for Python versions less than 3.8 - # validation_results = panda_sdrf.map(validate_string) - # else: - # # Use applymap for Python versions 3.8 and above - # validation_results = panda_sdrf.applymap(validate_string) + validation_results = panda_sdrf.map(validate_string)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
sdrf_pipelines/sdrf/sdrf_schema.py
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
I haven't run the test locally and would see what the GitHub Actions say... |
User description
switch between
applymap
andmap
seems unnecessary using later versions of pandas.PR Type
Bug fix, Enhancement
Description
Replaced deprecated
applymap
withmap
for pandas compatibility.Removed conditional logic for Python version checks.
Simplified validation logic for SDRF dataframes.
Changes walkthrough 📝
sdrf_schema.py
Updated SDRF validation to use `map` instead of `applymap`
sdrf_pipelines/sdrf/sdrf_schema.py
applymap
withmap
for pandas compatibility.Summary by CodeRabbit