PSLmodels / Tax-Brain

Tax-Brain is an integrator model for PSL tax models
http://taxbrain.pslmodels.org/
MIT License
9 stars 14 forks source link

Fix COMP table row order #51

Closed andersonfrailey closed 5 years ago

andersonfrailey commented 5 years ago

In issue #42 @donboyd5 pointed out that the order of the income bins in the distribution tables was being mixed up. Rather than appearing in order of ascending income, they appeared randomly. This PR fixes that issue.

Currently, after each table is made in the nth_year_results function, they are converted from a pandas DataFrame to a JSON string. Later on, they are converted back to a pandas DataFrame at which point the rows are somehow shuffled. I believe this dates back to TaxBrain 1.0.0.

In this PR I've removed the conversion of the original DataFrame so that the rows are never shuffled.

cc @hdoupe