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 pandas deprecation warning #2715

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

martinholmer
Copy link
Collaborator

The current code produces this pandas deprecation warning:

     /Users/mrh/work/Tax-Calculator/taxcalc/records.py:353:
        FutureWarning:
     Series.__getitem__ treating keys as positions is deprecated.
        In a future version, integer keys will always be treated as
        labels (consistent with DataFrame behavior). To access a value
        by position, use `ser.iloc[pos]`
     self.e00300 *= self.ADJ['INT{}'.format(year)][self.agi_bin].values

This pull request makes the recommended code revision.
This revision causes no change in tax calculation output.

Copy link

codecov bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d806ac3) 98.54% compared to head (3a1eefe) 98.54%.
Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2715   +/-   ##
=======================================
  Coverage   98.54%   98.54%           
=======================================
  Files          14       14           
  Lines        2616     2616           
=======================================
  Hits         2578     2578           
  Misses         38       38           
Flag Coverage Δ
unittests 98.54% <100.00%> (ø)

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

Files Coverage Δ
taxcalc/records.py 100.00% <100.00%> (ø)

@jdebacker
Copy link
Member

Thank you @martinholmer! Merging.

@jdebacker jdebacker merged commit eeffa54 into PSLmodels:master Feb 7, 2024
9 of 11 checks passed
@martinholmer martinholmer deleted the fix-warning branch February 7, 2024 15:29
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