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.
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