Jan-13-2017, 05:36 AM
Hello,
I need to check the value under the columns of two csv files (the current open file and the csv file written immediately before it) and if the value in the number column exists in the previous csv file, check to see if the value in the commits column is the same. If they are different, do something (there are more columns in the csv than listed). I'm having trouble trying to construct the correct comparison. What I have now is minimal, not working and I'm stuck
. Thanks for any help provided.
current.csv:
Number, Commits
1, 1,
prevous.csv:
Number, Commits
1, 2
I need to check the value under the columns of two csv files (the current open file and the csv file written immediately before it) and if the value in the number column exists in the previous csv file, check to see if the value in the commits column is the same. If they are different, do something (there are more columns in the csv than listed). I'm having trouble trying to construct the correct comparison. What I have now is minimal, not working and I'm stuck

current.csv:
Number, Commits
1, 1,
prevous.csv:
Number, Commits
1, 2
previous_csv = sorted(glob.iglob(reporting_path + '/' + '*.csv'), key=os.path.getctime)[-2] with open(current_csv, 'r') as f: print(previous_csv)