Solution submitted by Karthik for the Insight datascience challenge
pharmacy-counting.py is the final code which prompts the user to specify the input and output file paths.
The test large data set is not part of the repo. The user is required to download the tests suite in the correct location. The test_large is downloaded from link
The directory structure is similar to the one given in the question and is as follows-
├── README.md
├── input
│ └── itcont.txt
├── insight_testsuite
│ ├── run_tests.sh
│ └── tests
│ ├── test_1
│ │ ├── input
│ │ │ └── itcont.txt
│ │ └── output
│ │ └── top_cost_drug.txt
│ └── test_large
│ ├── input
│ │ └── de_cc_data.txt.crdownload
│ └── output
├── output
│ └── top_cost_drug.txt
├── run.sh
└── src
└── pharmacy-counting.py
None
To run basic test case: bash run.sh
To run all test case: bash insight_testsuite/run_tests.sh
pharmacy-counting.py is the final code which needs to be run after specifying the input/output file paths appropriately.
The output expected is of the form as given in the question. As the code has been run on the entire test set, the output corresponding to the test set has been obtained and can be found in the output section of the submission repository.