Code Monkey home page Code Monkey logo

renretest's Introduction

RenReTest

The solutuion is built with Python 3.6.1 and Pandas 0.20.2
The Final Solution is FindDealsCoveredByRenRe.py.
The input files are in Input folder.
The output files are in Output folder.
The test output files are in Output/Test folder.

Considerations

  1. The final solution FindDealsCoveredByRenRe used chunk in Pandas to handle large files. Other solutions could be using the library dask or sql lite.

  2. TheOtherSolutuion is my second thought after I finished the first one. After comparing the complexity, the solution FindDealsCoveredByRenRe is better than TheOtherSolutuion.

  • FindDealsCoveredByRenRe.py
    is seperated by 4 parts so the functions can be reusable.
    I work out this solutuion first. The Utilities.extract_contract_info returns includes and excludes lists. The lists are used to filter out the insurance covered by RenRe. Then the output file can be merged with the losses csv.

  • TheOtherSolution.py
    is one chunk, so the contract Json file is only read once. It reduced the reading time.
    After finished the first solution I was thinking if I could make the contract json file as a csv file. The final result could be produced by merging the 3 csv files. The complexity could be reduced comparing with the solution FindDealsCoveredByRenRe.py However, pandas can not do filtering csv files without same indexes. So for creating the same data format, more complexity produced during the process.

alt text

renretest's People

Contributors

cmajorsolo avatar

Watchers

 avatar

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.