I just want to have the dictionary's key and values in a data frame.

ETA_pred = []

for pred in ETA_predictions:
    ETA_pred.append(pred['predictions'][0])

or

ETA_pred = []

for pred in ETA_predictions:
    ETA_pred.append(pred['predictions'][0:])

Dictionary values:

ETA_predictions = [{'predictions': array([57.953255], dtype=float32)},
                   {'predictions': array([53.815216], dtype=float32)},
                   {'predictions': array([51.187553], dtype=float32)},
                   {'predictions': array([30.357912], dtype=float32)},
                   {'predictions': array([52.69792],  dtype=float32)},]

0 Answers