Code Monkey home page Code Monkey logo

Comments (2)

andersonfrailey avatar andersonfrailey commented on May 29, 2024

@martinholmer it is CLP_solver_16Years.py

from taxdata.

martinholmer avatar martinholmer commented on May 29, 2024

@andersonfrailey, Thanks for the pointer to the code that generates the WEIGHTS.csv file.
Here are the last two statements of that Python program:

# Export all weights
z = df(z, columns=['WT2009','WT2010','WT2011','WT2012','WT2013','WT2014',
                   'WT2015','WT2016','WT2017','WT2018','WT2019','WT2020',
                   'WT2021','WT2022','WT2023','WT2024', 'WT2025', 'WT2026'])
z.to_csv('WEIGHTS.csv', index = False)

I think we need to insert the following statement between these two existing statements:

z = z.round(0).astype('int64')

I think that will round the weights to the nearest whole number and then convert them to an integer datatype, so that the z.to_csv() call will write a CSV file containing integers.

Can you check that this suggest works as I imagine it will? If it does, can you prepare a taxdata pull request that makes this change? And then can you prepare a tax-calculator pull request that replaces the old float weights with the new integer weights? Doing all this will improve things along the lines discussed in tax-calculator pull request 1153, which will not be needed after you make these changes.

@MattHJensen @Amy-Xu

from taxdata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.