Sep-18-2017, 03:21 AM
In checkRawData, you are updating filtered_data. But that is only ever one year. You just keep changing what year it is. You either need filtered_data to be a list, which you initialize to empty at the start of checkRawData, and append to each time through the loop; or you need to write in the loop in checkRawData, not in a separate function.
Note that your function calls are redundant. At the end of the program you have three calls:
Note that your function calls are redundant. At the end of the program you have three calls:
- readFile(), but you don't do anything with the return value.
- checkRawData(), which calls readFile() again, and you don't do anything with the returned filtered_data.
- writeFile(), which calls checkRawData() again, which calls readFile() a third time.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures