Suppose I have a dataframe like below:
        FDT_DATE    FFLT_LATITUDE   FFLT_LONGITUDE  FINT_STAT   FSTR_ID
51307   1417390467000   31.2899     121.4845    0   112609
51308   1417390428000   31.2910     121.4859    0   112609
51309   1417390608000   31.2944     121.4857    1   112609
51310   1417390548000   31.2940     121.4850    1   112609
51313   1417390668000   31.2954     121.4886    1   112609
51314   1417390717000   31.2965     121.4937    1   112609
53593   1417390758000   31.2946     121.4940    0   112609
63586   1417390798000   31.2932     121.4960    1   112609
63587   1417390818000   31.2940     121.4966    1   112609
63588   1417390827000   31.2946     121.4974    1   112609
63589   1417390907000   31.2952     121.4986    0   112609
I want to extract the location records in a polyline list, means to extract location of the records which have the same FSTR_ID and with the FINT_STAT equals to 1 :
    FSTR_ID    FDT_DATE    POLYLINE
0   112609    1417390608000 [[31.2944,121.4857],[31.2940,121.4850],[31.2954,121.4886],[31.2965,121.4937]]
1   112609    1417390798000 [[31.2932,121.4960],[31.2940,121.4966],[31.2946, 121.4974]]
How can I do that?
The orginal dataset can be generated by this code:
import pandas as pd
df = pd.DataFrame({"FDT_DATE":{"0":1417390467000,"1":1417390428000,"2":1417390608000,"3":1417390548000,"4":1417390668000,"5":1417390717000,"6":1417390758000,"7":1417390798000,"8":1417390818000,"9":1417390827000,"10":1417390907000},"FFLT_LATITUDE":{"0":31.2899,"1":31.291,"2":31.2944,"3":31.294,"4":31.2954,"5":31.2965,"6":31.2946,"7":31.2932,"8":31.294,"9":31.2946,"10":31.2952},"FFLT_LONGITUDE":{"0":121.4845,"1":121.4859,"2":121.4857,"3":121.485,"4":121.4886,"5":121.4937,"6":121.494,"7":121.496,"8":121.4966,"9":121.4974,"10":121.4986},"FINT_STAT":{"0":0,"1":0,"2":1,"3":1,"4":1,"5":1,"6":0,"7":1,"8":1,"9":1,"10":0},"FSTR_ID":{"0":112609,"1":112609,"2":112609,"3":112609,"4":112609,"5":112609,"6":112609,"7":112609,"8":112609,"9":112609,"10":112609}})
df = df.sort(['FDT_DATE'])