Python CSV file processing
- by kingwarchief
I just got introduced to python, the first language I get to learn, and I have this question below:
I have an excel based CSV file with two columns (or rows, Pythonically) that I am working on. What I need to do is to perform some operations so that I can compare the two data entries in each 'row'. To be more precise, one column has constant numbers all the way down, whereas the other column varies. So I need to count the number of times the varying column data entry values crosses the constant value on the other column.
For example:
Varying Column; Constant Column
24 25
26 25 crosses
27 25
26 25
25.5 25
23 25 crossed
26 25 crossed
So in this case the number of times there is a cross