If I have created a predefined list, say top 3 stocks in the order of ["CAT","AI", "BOC"], how can I get this new dataframe by working from the original dataframe below that will essentially sort_value the ticker column by the order for which the above predefined list is shown? (still chronological order also)
Thanks
     date       price ticker  volume
0  2018-01-01  1.323     AI    2000
1  2018-01-02  1.525     AI    1500
2  2018-01-03  1.045     AI     500
3  2018-01-01  2.110    BOC    3201
4  2018-01-02  2.150    BOC    5200
5  2018-01-03  2.810    BOC    1980
6  2018-01-01  5.199    CAT    2000
7  2018-01-02  4.980    CAT     450
8  2018-01-03  4.990    CAT    3000
 
     
    