Exemple #1
0
def main():
    df = []
    outputData = pd.DataFrame(columns=['Time','Location','Box', 'CarID'])
    douglas = pd.read_csv("mlk-douglas-cam-1.csv")
    #douglas = douglas[douglas.label== 'car']
    # Normally, iterate through every row in the "locations" col
    # eval should do the job, and takes care of the inner dicts too
    test = 1


    for i in range(test):
        
        
        loc = eval(douglas["locations"][i])
        id_one = douglas["id"][0]
        # here you can see the list, that it is type list, and that its contents are dicts
        #print(locs, type(locs), type(locs[0]))
    
        buff = Location(douglas, 1)
        #box = buff.check_box()
        #print(box)
        buff.get_location()
        
        buff.check_box()
        buff.get_timestamp()
        

        #entry=[{'Time':buff.get_timestamp(), 'buff.get_location(),buff.check_box(),douglas["id"][i]}]
        #print(entry)
        print(buff.appender())
        #df = df.append(entry, ignore_index = True)
        outputData = outputData.append(entry, ignore_index = True)
    print(outputData)
   
    
    
    df = outputData.copy()
    #print(df['Time'][])
    print(df.index)
    times = []
    """