I have a below dataframe and want to count the number of time the value got changed over time.
input dataframe:
class  date         value
A      2019-01-02   80
A      2019-02-02   80
A      2019-03-02   90
A      2019-04-02   20
A      2019-05-02   80
A      2019-06-02   Null
A      2019-06-03   70
A      2019-06-04   70
A      2019-06-05   20
B ...
output dataframe as below:
class count_of_val
A      6              
reason: (80,90,20,80, null,70, 20)
 
     
     
    