How can I select all rows of a data frame where a condition is met according to a column, which has to do with the relationship between every 2 entries of that column. To give the specific example, lets say I have a DataFrame:
>>>df = pd.DataFrame({'A': [ 1, 2, 3, 4],
                      'B':['spam', 'ham', 'egg', 'foo'],
                      'C':[4, 5, 3, 4]})
>>> df
   A     B  C
0  1  spam  4
1  2   ham  5
2  3   egg  3
3  4   foo  4
>>>df2 = df[ return every row of df where C[i] > C[i-1] ]
>>> df2
   A    B  C
1  2  ham  5
3  4  foo  4
There is plenty of great information about slicing and indexing in the pandas docs and here, but this is a bit more complicated, I think. I could also be going about it wrong. What I'm looking for is the rows of data where the value stored in C is no longer monotonously declining.
Any help is appreciated!
 
    