Skip to content

Comments

Fix pandas warning#448

Merged
orbeckst merged 4 commits intoalchemistry:masterfrom
xiki-tempula:clear_pandas_warning
Jan 23, 2026
Merged

Fix pandas warning#448
orbeckst merged 4 commits intoalchemistry:masterfrom
xiki-tempula:clear_pandas_warning

Conversation

@xiki-tempula
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.01%. Comparing base (7b36e41) to head (dcfab02).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #448   +/-   ##
=======================================
  Coverage   99.01%   99.01%           
=======================================
  Files          29       29           
  Lines        2444     2446    +2     
  Branches      464      464           
=======================================
+ Hits         2420     2422    +2     
  Misses          2        2           
  Partials       22       22           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xiki-tempula xiki-tempula requested a review from Copilot December 15, 2025 10:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses pandas warnings by replacing deprecated .apply(lambda x: round(x, prec)) patterns with the modern .round(prec) method, and adding .copy() to chained indexing operations to avoid SettingWithCopyWarning.

Key Changes:

  • Replaced .apply(lambda x: round(x, prec)) with .round(prec) for better performance and to eliminate deprecation warnings
  • Added .copy() after .iloc indexing to prevent pandas SettingWithCopyWarning
  • Refactored multi-column rounding operations to use intermediate variables for clarity

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/alchemlyb/parsing/lammps.py Updated pandas operations to use modern methods and avoid chained indexing warnings across multiple functions
CHANGES Added changelog entry documenting the fix for pandas warnings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@xiki-tempula xiki-tempula marked this pull request as ready for review December 15, 2025 10:45
@xiki-tempula xiki-tempula requested a review from orbeckst January 23, 2026 10:41
Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

lgtm, will just add you to CHANGES

@orbeckst orbeckst enabled auto-merge (squash) January 23, 2026 15:17
@orbeckst orbeckst merged commit 9c44d0a into alchemistry:master Jan 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants