Imagine we have this pandas dataframe:
TABLE_A
What transformation do I have to do from the table above to create a column (B column) like this?:
TABLE_B
Note: what I really want to do is create a new column B, with the coding of three values (-1,0 or 1) depending if in column A the just previous value is greater, smaller or equal.
Thank you!