I have the following python method that I got it from the selected answer to this question:
def _dataframe_from_ordered_dict(self, source_data):
return pd.DataFrame([source_data[i][0] for i, j in enumerate(source_data)])
The problem is that I am getting this error: [source_data[i][0] for i, j in enumerate(source_data)]) KeyError: 0
.
EDIT
This is a subset of the content of source_data
, it raises the same error:
[OrderedDict([('\ufeffZipcode', '1606'), ('primary_city', 'Worcester'), ('state', 'MA'), ('AXLE_CA_Local_Zone', '2'), ('AXLE_DS_Zone', '2'), ('ASCR_DS_Zone', '2'), ('CDL_NJ_Local_Zone', ''), ('CRX_GA_Local_Zone', ''), ('CRX_TPAFL_Zone', ''), ('GLS_CA_Local_Zone', ''), ('GLS_Surcharge', ''), ('TFRC_DS_Zone', '2'), ('LSR_NJ_Local_Zone', '2'),
('LSR_MD_Local_Zone', '4'), ('LSR_TX_Local_Zone', '2'), ('LSR_GA_Local_Zone', '5'), ('LSR_ORL_DS_Zone', '6'), ('LSR_GROOH_DS_Zone', '5'), ('LSR_ATL_DS_Zone', '5'), ('LSR_CHANC_DS_Zone', '5'), ('SPR_TX_Local_Zone', '2'), ('UDS_DS_Zone', ''), ('Veho_Local_Zone', '3'), ('Veho_DS_Zone', '2'), ('HFDN_DS_Zone', '2'), ('UPS_NJ_Local_Zone', '2'), ('UPS_NT_Local_Zone', '2'), ('UPS_GA_Local_Zone', '5'), ('UPS_SE_Local_Zone', '5'), ('UPS_TX_Local_Zone', '7'), ('UPS_FW_Local_Zone', '7'), ('UPS_DL_Local_Zone', '7'), ('UPS_CA_Local_Zone', '8'), ('UPS_MD_Local_Zone', '4'), ('UPS_PA_Local_Zone', '3'), ('UPS_NW_Local_Zone', '8'), ('FedEx_NJ_Local_Zone', '2'), ('FedEx_NT_Local_Zone', '2'), ('FedEx_PA_Local_Zone', '3'), ('FedEx_MD_Local_Zone', '4'), ('FedEx_DL_Local_Zone', '7'), ('FedEx_GA_Local_Zone', '5'), ('FedEx_TX_Local_Zone', '7'), ('FedEx_CA_Local_Zone', '8'), ('FedEx_FW_Local_Zone', '7'), ('FedEx_NW_Local_Zone', '8'), ('FedEx_SE_Local_Zone', '5'), ('FedEx_PHOAZ_DS_Zone', '8'), ('FedEx_PHXAZ_DS_Zone', '8'), ('FedEx_HAPA_DS_Zone', '3'), ('FedEx_DENCO_DS_Zone', '7'), ('FedEx_MEMTN_DS_Zone', '6'), ('FedEx_POOR_DS_Zone', '8'), ('FedEx_RICA_DS_Zone', '8'), ('FedEx_KCMO_DS_Zone', '6'), ('FedEx_ORLFL_DS_Zone', '6'), ('FedEx_ATLGA_DS_Zone', '5'), ('FedEx_CHI_DS_Zone', '5'), ('FedEx_CHANC_DS_Zone', '5'), ('FedEx_COLOH_DS_Zone', '5'), ('FedEx_HAMD_DS_Zone', '4'), ('FedEx_STPMN_DS_Zone', '6'), ('FedEx_CYPRTX_DS_Zone', '7'), ('FedEx_SD_DS_Zone', '2'), ('UPS_Surcharge', ''), ('FDX_Surcharge', ''), ('FDX_AZ_Local_Zone', '8'), ('FedEx_SALUT_DS_Zone', '8'), ('FedEx_WILCT_DS_Zone', '2'), ('FedEx_VBRMI_DS_Zone', '4')]),
OrderedDict([('\ufeffZipcode', '1607'), ('primary_city', 'Worcester'), ('state', 'MA'), ('AXLE_CA_Local_Zone', '2'), ('AXLE_DS_Zone', '2'), ('ASCR_DS_Zone', '2'), ('CDL_NJ_Local_Zone', ''), ('CRX_GA_Local_Zone', ''), ('CRX_TPAFL_Zone', ''), ('GLS_CA_Local_Zone', ''), ('GLS_Surcharge', ''), ('TFRC_DS_Zone', '2'), ('LSR_NJ_Local_Zone', '2'),
('LSR_MD_Local_Zone', '4'), ('LSR_TX_Local_Zone', '3'), ('LSR_GA_Local_Zone', '5'), ('LSR_ORL_DS_Zone', '6'), ('LSR_GROOH_DS_Zone', '5'), ('LSR_ATL_DS_Zone', '5'), ('LSR_CHANC_DS_Zone', '5'), ('SPR_TX_Local_Zone', '2'), ('UDS_DS_Zone', ''), ('Veho_Local_Zone', '3'), ('Veho_DS_Zone', '2'), ('HFDN_DS_Zone', '2'), ('UPS_NJ_Local_Zone', '2'), ('UPS_NT_Local_Zone', '2'), ('UPS_GA_Local_Zone', '5'), ('UPS_SE_Local_Zone', '5'), ('UPS_TX_Local_Zone', '7'), ('UPS_FW_Local_Zone', '7'), ('UPS_DL_Local_Zone', '7'), ('UPS_CA_Local_Zone', '8'), ('UPS_MD_Local_Zone', '4'), ('UPS_PA_Local_Zone', '3'), ('UPS_NW_Local_Zone', '8'), ('FedEx_NJ_Local_Zone', '2'), ('FedEx_NT_Local_Zone', '2'), ('FedEx_PA_Local_Zone', '3'), ('FedEx_MD_Local_Zone', '4'), ('FedEx_DL_Local_Zone', '7'), ('FedEx_GA_Local_Zone', '5'), ('FedEx_TX_Local_Zone', '7'), ('FedEx_CA_Local_Zone', '8'), ('FedEx_FW_Local_Zone', '7'), ('FedEx_NW_Local_Zone', '8'), ('FedEx_SE_Local_Zone', '5'), ('FedEx_PHOAZ_DS_Zone', '8'), ('FedEx_PHXAZ_DS_Zone', '8'), ('FedEx_HAPA_DS_Zone', '3'), ('FedEx_DENCO_DS_Zone', '7'), ('FedEx_MEMTN_DS_Zone', '6'), ('FedEx_POOR_DS_Zone', '8'), ('FedEx_RICA_DS_Zone', '8'), ('FedEx_KCMO_DS_Zone', '6'), ('FedEx_ORLFL_DS_Zone', '6'), ('FedEx_ATLGA_DS_Zone', '5'), ('FedEx_CHI_DS_Zone', '5'), ('FedEx_CHANC_DS_Zone', '5'), ('FedEx_COLOH_DS_Zone', '5'), ('FedEx_HAMD_DS_Zone', '4'), ('FedEx_STPMN_DS_Zone', '6'), ('FedEx_CYPRTX_DS_Zone', '7'), ('FedEx_SD_DS_Zone', '2'), ('UPS_Surcharge', ''), ('FDX_Surcharge', ''), ('FDX_AZ_Local_Zone', '8'), ('FedEx_SALUT_DS_Zone', '8'), ('FedEx_WILCT_DS_Zone', '2'), ('FedEx_VBRMI_DS_Zone', '4')]),
OrderedDict([('\ufeffZipcode', '1608'), ('primary_city', 'Worcester'), ('state', 'MA'), ('AXLE_CA_Local_Zone', '2'), ('AXLE_DS_Zone', '2'), ('ASCR_DS_Zone', '2'), ('CDL_NJ_Local_Zone', ''), ('CRX_GA_Local_Zone', ''), ('CRX_TPAFL_Zone', ''), ('GLS_CA_Local_Zone', ''), ('GLS_Surcharge', ''), ('TFRC_DS_Zone', '2'), ('LSR_NJ_Local_Zone', '2'),
('LSR_MD_Local_Zone', '4'), ('LSR_TX_Local_Zone', '3'), ('LSR_GA_Local_Zone', '5'), ('LSR_ORL_DS_Zone', '6'), ('LSR_GROOH_DS_Zone', '5'), ('LSR_ATL_DS_Zone', '5'), ('LSR_CHANC_DS_Zone', '5'), ('SPR_TX_Local_Zone', '2'), ('UDS_DS_Zone', ''), ('Veho_Local_Zone', '3'), ('Veho_DS_Zone', '2'), ('HFDN_DS_Zone', '2'), ('UPS_NJ_Local_Zone', '2'), ('UPS_NT_Local_Zone', '2'), ('UPS_GA_Local_Zone', '5'), ('UPS_SE_Local_Zone', '5'), ('UPS_TX_Local_Zone', '7'), ('UPS_FW_Local_Zone', '7'), ('UPS_DL_Local_Zone', '7'), ('UPS_CA_Local_Zone', '8'), ('UPS_MD_Local_Zone', '4'), ('UPS_PA_Local_Zone', '3'), ('UPS_NW_Local_Zone', '8'), ('FedEx_NJ_Local_Zone', '2'), ('FedEx_NT_Local_Zone', '2'), ('FedEx_PA_Local_Zone', '3'), ('FedEx_MD_Local_Zone', '4'), ('FedEx_DL_Local_Zone', '7'), ('FedEx_GA_Local_Zone', '5'), ('FedEx_TX_Local_Zone', '7'), ('FedEx_CA_Local_Zone', '8'), ('FedEx_FW_Local_Zone', '7'), ('FedEx_NW_Local_Zone', '8'), ('FedEx_SE_Local_Zone', '5'), ('FedEx_PHOAZ_DS_Zone', '8'), ('FedEx_PHXAZ_DS_Zone', '8'), ('FedEx_HAPA_DS_Zone', '3'), ('FedEx_DENCO_DS_Zone', '7'), ('FedEx_MEMTN_DS_Zone', '6'), ('FedEx_POOR_DS_Zone', '8'), ('FedEx_RICA_DS_Zone', '8'), ('FedEx_KCMO_DS_Zone', '6'), ('FedEx_ORLFL_DS_Zone', '6'), ('FedEx_ATLGA_DS_Zone', '5'), ('FedEx_CHI_DS_Zone', '5'), ('FedEx_CHANC_DS_Zone', '5'), ('FedEx_COLOH_DS_Zone', '5'), ('FedEx_HAMD_DS_Zone', '4'), ('FedEx_STPMN_DS_Zone', '6'), ('FedEx_CYPRTX_DS_Zone', '7'), ('FedEx_SD_DS_Zone', '2'), ('UPS_Surcharge', ''), ('FDX_Surcharge', ''), ('FDX_AZ_Local_Zone', '8'), ('FedEx_SALUT_DS_Zone', '8'), ('FedEx_WILCT_DS_Zone', '2'), ('FedEx_VBRMI_DS_Zone', '4')]),
OrderedDict([('\ufeffZipcode', '1609'), ('primary_city', 'Worcester'), ('state', 'MA'), ('AXLE_CA_Local_Zone', '2'), ('AXLE_DS_Zone', '2'), ('ASCR_DS_Zone', '2'), ('CDL_NJ_Local_Zone', ''), ('CRX_GA_Local_Zone', ''), ('CRX_TPAFL_Zone', ''), ('GLS_CA_Local_Zone', ''), ('GLS_Surcharge', ''), ('TFRC_DS_Zone', '2'), ('LSR_NJ_Local_Zone', '2'),
('LSR_MD_Local_Zone', '4'), ('LSR_TX_Local_Zone', '3'), ('LSR_GA_Local_Zone', '5'), ('LSR_ORL_DS_Zone', '6'), ('LSR_GROOH_DS_Zone', '5'), ('LSR_ATL_DS_Zone', '5'), ('LSR_CHANC_DS_Zone', '5'), ('SPR_TX_Local_Zone', '2'), ('UDS_DS_Zone', ''), ('Veho_Local_Zone', '3'), ('Veho_DS_Zone', '2'), ('HFDN_DS_Zone', '2'), ('UPS_NJ_Local_Zone', '2'), ('UPS_NT_Local_Zone', '2'), ('UPS_GA_Local_Zone', '5'), ('UPS_SE_Local_Zone', '5'), ('UPS_TX_Local_Zone', '7'), ('UPS_FW_Local_Zone', '7'), ('UPS_DL_Local_Zone', '7'), ('UPS_CA_Local_Zone', '8'), ('UPS_MD_Local_Zone', '4'), ('UPS_PA_Local_Zone', '3'), ('UPS_NW_Local_Zone', '8'), ('FedEx_NJ_Local_Zone', '2'), ('FedEx_NT_Local_Zone', '2'), ('FedEx_PA_Local_Zone', '3'), ('FedEx_MD_Local_Zone', '4'), ('FedEx_DL_Local_Zone', '7'), ('FedEx_GA_Local_Zone', '5'), ('FedEx_TX_Local_Zone', '7'), ('FedEx_CA_Local_Zone', '8'), ('FedEx_FW_Local_Zone', '7'), ('FedEx_NW_Local_Zone', '8'), ('FedEx_SE_Local_Zone', '5'), ('FedEx_PHOAZ_DS_Zone', '8'), ('FedEx_PHXAZ_DS_Zone', '8'), ('FedEx_HAPA_DS_Zone', '3'), ('FedEx_DENCO_DS_Zone', '7'), ('FedEx_MEMTN_DS_Zone', '6'), ('FedEx_POOR_DS_Zone', '8'), ('FedEx_RICA_DS_Zone', '8'), ('FedEx_KCMO_DS_Zone', '6'), ('FedEx_ORLFL_DS_Zone', '6'), ('FedEx_ATLGA_DS_Zone', '5'), ('FedEx_CHI_DS_Zone', '5'), ('FedEx_CHANC_DS_Zone', '5'), ('FedEx_COLOH_DS_Zone', '5'), ('FedEx_HAMD_DS_Zone', '4'), ('FedEx_STPMN_DS_Zone', '6'), ('FedEx_CYPRTX_DS_Zone', '7'), ('FedEx_SD_DS_Zone', '2'), ('UPS_Surcharge', ''), ('FDX_Surcharge', ''), ('FDX_AZ_Local_Zone', '8'), ('FedEx_SALUT_DS_Zone', '8'), ('FedEx_WILCT_DS_Zone', '2'), ('FedEx_VBRMI_DS_Zone', '4')])]
I don't know what I am missing if I am following the answer as it is.
CodePudding user response:
Try this:
import pandas as pd
from collections import OrderedDict
l = [OrderedDict([('\ufeffZipcode', '1606'), ('primary_city', 'Worcester'), ('state', 'MA'), ('AXLE_CA_Local_Zone', '2'), ('AXLE_DS_Zone', '2'), ('ASCR_DS_Zone', '2'), ('CDL_NJ_Local_Zone', ''), ('CRX_GA_Local_Zone', ''), ('CRX_TPAFL_Zone', ''), ('GLS_CA_Local_Zone', ''), ('GLS_Surcharge', ''), ('TFRC_DS_Zone', '2'), ('LSR_NJ_Local_Zone', '2'),
('LSR_MD_Local_Zone', '4'), ('LSR_TX_Local_Zone', '2'), ('LSR_GA_Local_Zone', '5'), ('LSR_ORL_DS_Zone', '6'), ('LSR_GROOH_DS_Zone', '5'), ('LSR_ATL_DS_Zone', '5'), ('LSR_CHANC_DS_Zone', '5'), ('SPR_TX_Local_Zone', '2'), ('UDS_DS_Zone', ''), ('Veho_Local_Zone', '3'), ('Veho_DS_Zone', '2'), ('HFDN_DS_Zone', '2'), ('UPS_NJ_Local_Zone', '2'), ('UPS_NT_Local_Zone', '2'), ('UPS_GA_Local_Zone', '5'), ('UPS_SE_Local_Zone', '5'), ('UPS_TX_Local_Zone', '7'), ('UPS_FW_Local_Zone', '7'), ('UPS_DL_Local_Zone', '7'), ('UPS_CA_Local_Zone', '8'), ('UPS_MD_Local_Zone', '4'), ('UPS_PA_Local_Zone', '3'), ('UPS_NW_Local_Zone', '8'), ('FedEx_NJ_Local_Zone', '2'), ('FedEx_NT_Local_Zone', '2'), ('FedEx_PA_Local_Zone', '3'), ('FedEx_MD_Local_Zone', '4'), ('FedEx_DL_Local_Zone', '7'), ('FedEx_GA_Local_Zone', '5'), ('FedEx_TX_Local_Zone', '7'), ('FedEx_CA_Local_Zone', '8'), ('FedEx_FW_Local_Zone', '7'), ('FedEx_NW_Local_Zone', '8'), ('FedEx_SE_Local_Zone', '5'), ('FedEx_PHOAZ_DS_Zone', '8'), ('FedEx_PHXAZ_DS_Zone', '8'), ('FedEx_HAPA_DS_Zone', '3'), ('FedEx_DENCO_DS_Zone', '7'), ('FedEx_MEMTN_DS_Zone', '6'), ('FedEx_POOR_DS_Zone', '8'), ('FedEx_RICA_DS_Zone', '8'), ('FedEx_KCMO_DS_Zone', '6'), ('FedEx_ORLFL_DS_Zone', '6'), ('FedEx_ATLGA_DS_Zone', '5'), ('FedEx_CHI_DS_Zone', '5'), ('FedEx_CHANC_DS_Zone', '5'), ('FedEx_COLOH_DS_Zone', '5'), ('FedEx_HAMD_DS_Zone', '4'), ('FedEx_STPMN_DS_Zone', '6'), ('FedEx_CYPRTX_DS_Zone', '7'), ('FedEx_SD_DS_Zone', '2'), ('UPS_Surcharge', ''), ('FDX_Surcharge', ''), ('FDX_AZ_Local_Zone', '8'), ('FedEx_SALUT_DS_Zone', '8'), ('FedEx_WILCT_DS_Zone', '2'), ('FedEx_VBRMI_DS_Zone', '4')]),
OrderedDict([('\ufeffZipcode', '1607'), ('primary_city', 'Worcester'), ('state', 'MA'), ('AXLE_CA_Local_Zone', '2'), ('AXLE_DS_Zone', '2'), ('ASCR_DS_Zone', '2'), ('CDL_NJ_Local_Zone', ''), ('CRX_GA_Local_Zone', ''), ('CRX_TPAFL_Zone', ''), ('GLS_CA_Local_Zone', ''), ('GLS_Surcharge', ''), ('TFRC_DS_Zone', '2'), ('LSR_NJ_Local_Zone', '2'),
('LSR_MD_Local_Zone', '4'), ('LSR_TX_Local_Zone', '3'), ('LSR_GA_Local_Zone', '5'), ('LSR_ORL_DS_Zone', '6'), ('LSR_GROOH_DS_Zone', '5'), ('LSR_ATL_DS_Zone', '5'), ('LSR_CHANC_DS_Zone', '5'), ('SPR_TX_Local_Zone', '2'), ('UDS_DS_Zone', ''), ('Veho_Local_Zone', '3'), ('Veho_DS_Zone', '2'), ('HFDN_DS_Zone', '2'), ('UPS_NJ_Local_Zone', '2'), ('UPS_NT_Local_Zone', '2'), ('UPS_GA_Local_Zone', '5'), ('UPS_SE_Local_Zone', '5'), ('UPS_TX_Local_Zone', '7'), ('UPS_FW_Local_Zone', '7'), ('UPS_DL_Local_Zone', '7'), ('UPS_CA_Local_Zone', '8'), ('UPS_MD_Local_Zone', '4'), ('UPS_PA_Local_Zone', '3'), ('UPS_NW_Local_Zone', '8'), ('FedEx_NJ_Local_Zone', '2'), ('FedEx_NT_Local_Zone', '2'), ('FedEx_PA_Local_Zone', '3'), ('FedEx_MD_Local_Zone', '4'), ('FedEx_DL_Local_Zone', '7'), ('FedEx_GA_Local_Zone', '5'), ('FedEx_TX_Local_Zone', '7'), ('FedEx_CA_Local_Zone', '8'), ('FedEx_FW_Local_Zone', '7'), ('FedEx_NW_Local_Zone', '8'), ('FedEx_SE_Local_Zone', '5'), ('FedEx_PHOAZ_DS_Zone', '8'), ('FedEx_PHXAZ_DS_Zone', '8'), ('FedEx_HAPA_DS_Zone', '3'), ('FedEx_DENCO_DS_Zone', '7'), ('FedEx_MEMTN_DS_Zone', '6'), ('FedEx_POOR_DS_Zone', '8'), ('FedEx_RICA_DS_Zone', '8'), ('FedEx_KCMO_DS_Zone', '6'), ('FedEx_ORLFL_DS_Zone', '6'), ('FedEx_ATLGA_DS_Zone', '5'), ('FedEx_CHI_DS_Zone', '5'), ('FedEx_CHANC_DS_Zone', '5'), ('FedEx_COLOH_DS_Zone', '5'), ('FedEx_HAMD_DS_Zone', '4'), ('FedEx_STPMN_DS_Zone', '6'), ('FedEx_CYPRTX_DS_Zone', '7'), ('FedEx_SD_DS_Zone', '2'), ('UPS_Surcharge', ''), ('FDX_Surcharge', ''), ('FDX_AZ_Local_Zone', '8'), ('FedEx_SALUT_DS_Zone', '8'), ('FedEx_WILCT_DS_Zone', '2'), ('FedEx_VBRMI_DS_Zone', '4')]),
OrderedDict([('\ufeffZipcode', '1608'), ('primary_city', 'Worcester'), ('state', 'MA'), ('AXLE_CA_Local_Zone', '2'), ('AXLE_DS_Zone', '2'), ('ASCR_DS_Zone', '2'), ('CDL_NJ_Local_Zone', ''), ('CRX_GA_Local_Zone', ''), ('CRX_TPAFL_Zone', ''), ('GLS_CA_Local_Zone', ''), ('GLS_Surcharge', ''), ('TFRC_DS_Zone', '2'), ('LSR_NJ_Local_Zone', '2'),
('LSR_MD_Local_Zone', '4'), ('LSR_TX_Local_Zone', '3'), ('LSR_GA_Local_Zone', '5'), ('LSR_ORL_DS_Zone', '6'), ('LSR_GROOH_DS_Zone', '5'), ('LSR_ATL_DS_Zone', '5'), ('LSR_CHANC_DS_Zone', '5'), ('SPR_TX_Local_Zone', '2'), ('UDS_DS_Zone', ''), ('Veho_Local_Zone', '3'), ('Veho_DS_Zone', '2'), ('HFDN_DS_Zone', '2'), ('UPS_NJ_Local_Zone', '2'), ('UPS_NT_Local_Zone', '2'), ('UPS_GA_Local_Zone', '5'), ('UPS_SE_Local_Zone', '5'), ('UPS_TX_Local_Zone', '7'), ('UPS_FW_Local_Zone', '7'), ('UPS_DL_Local_Zone', '7'), ('UPS_CA_Local_Zone', '8'), ('UPS_MD_Local_Zone', '4'), ('UPS_PA_Local_Zone', '3'), ('UPS_NW_Local_Zone', '8'), ('FedEx_NJ_Local_Zone', '2'), ('FedEx_NT_Local_Zone', '2'), ('FedEx_PA_Local_Zone', '3'), ('FedEx_MD_Local_Zone', '4'), ('FedEx_DL_Local_Zone', '7'), ('FedEx_GA_Local_Zone', '5'), ('FedEx_TX_Local_Zone', '7'), ('FedEx_CA_Local_Zone', '8'), ('FedEx_FW_Local_Zone', '7'), ('FedEx_NW_Local_Zone', '8'), ('FedEx_SE_Local_Zone', '5'), ('FedEx_PHOAZ_DS_Zone', '8'), ('FedEx_PHXAZ_DS_Zone', '8'), ('FedEx_HAPA_DS_Zone', '3'), ('FedEx_DENCO_DS_Zone', '7'), ('FedEx_MEMTN_DS_Zone', '6'), ('FedEx_POOR_DS_Zone', '8'), ('FedEx_RICA_DS_Zone', '8'), ('FedEx_KCMO_DS_Zone', '6'), ('FedEx_ORLFL_DS_Zone', '6'), ('FedEx_ATLGA_DS_Zone', '5'), ('FedEx_CHI_DS_Zone', '5'), ('FedEx_CHANC_DS_Zone', '5'), ('FedEx_COLOH_DS_Zone', '5'), ('FedEx_HAMD_DS_Zone', '4'), ('FedEx_STPMN_DS_Zone', '6'), ('FedEx_CYPRTX_DS_Zone', '7'), ('FedEx_SD_DS_Zone', '2'), ('UPS_Surcharge', ''), ('FDX_Surcharge', ''), ('FDX_AZ_Local_Zone', '8'), ('FedEx_SALUT_DS_Zone', '8'), ('FedEx_WILCT_DS_Zone', '2'), ('FedEx_VBRMI_DS_Zone', '4')]),
OrderedDict([('\ufeffZipcode', '1609'), ('primary_city', 'Worcester'), ('state', 'MA'), ('AXLE_CA_Local_Zone', '2'), ('AXLE_DS_Zone', '2'), ('ASCR_DS_Zone', '2'), ('CDL_NJ_Local_Zone', ''), ('CRX_GA_Local_Zone', ''), ('CRX_TPAFL_Zone', ''), ('GLS_CA_Local_Zone', ''), ('GLS_Surcharge', ''), ('TFRC_DS_Zone', '2'), ('LSR_NJ_Local_Zone', '2'),
('LSR_MD_Local_Zone', '4'), ('LSR_TX_Local_Zone', '3'), ('LSR_GA_Local_Zone', '5'), ('LSR_ORL_DS_Zone', '6'), ('LSR_GROOH_DS_Zone', '5'), ('LSR_ATL_DS_Zone', '5'), ('LSR_CHANC_DS_Zone', '5'), ('SPR_TX_Local_Zone', '2'), ('UDS_DS_Zone', ''), ('Veho_Local_Zone', '3'), ('Veho_DS_Zone', '2'), ('HFDN_DS_Zone', '2'), ('UPS_NJ_Local_Zone', '2'), ('UPS_NT_Local_Zone', '2'), ('UPS_GA_Local_Zone', '5'), ('UPS_SE_Local_Zone', '5'), ('UPS_TX_Local_Zone', '7'), ('UPS_FW_Local_Zone', '7'), ('UPS_DL_Local_Zone', '7'), ('UPS_CA_Local_Zone', '8'), ('UPS_MD_Local_Zone', '4'), ('UPS_PA_Local_Zone', '3'), ('UPS_NW_Local_Zone', '8'), ('FedEx_NJ_Local_Zone', '2'), ('FedEx_NT_Local_Zone', '2'), ('FedEx_PA_Local_Zone', '3'), ('FedEx_MD_Local_Zone', '4'), ('FedEx_DL_Local_Zone', '7'), ('FedEx_GA_Local_Zone', '5'), ('FedEx_TX_Local_Zone', '7'), ('FedEx_CA_Local_Zone', '8'), ('FedEx_FW_Local_Zone', '7'), ('FedEx_NW_Local_Zone', '8'), ('FedEx_SE_Local_Zone', '5'), ('FedEx_PHOAZ_DS_Zone', '8'), ('FedEx_PHXAZ_DS_Zone', '8'), ('FedEx_HAPA_DS_Zone', '3'), ('FedEx_DENCO_DS_Zone', '7'), ('FedEx_MEMTN_DS_Zone', '6'), ('FedEx_POOR_DS_Zone', '8'), ('FedEx_RICA_DS_Zone', '8'), ('FedEx_KCMO_DS_Zone', '6'), ('FedEx_ORLFL_DS_Zone', '6'), ('FedEx_ATLGA_DS_Zone', '5'), ('FedEx_CHI_DS_Zone', '5'), ('FedEx_CHANC_DS_Zone', '5'), ('FedEx_COLOH_DS_Zone', '5'), ('FedEx_HAMD_DS_Zone', '4'), ('FedEx_STPMN_DS_Zone', '6'), ('FedEx_CYPRTX_DS_Zone', '7'), ('FedEx_SD_DS_Zone', '2'), ('UPS_Surcharge', ''), ('FDX_Surcharge', ''), ('FDX_AZ_Local_Zone', '8'), ('FedEx_SALUT_DS_Zone', '8'), ('FedEx_WILCT_DS_Zone', '2'), ('FedEx_VBRMI_DS_Zone', '4')])]
def dataframe_from_ordered_dict(source_data):
return pd.DataFrame([source_data[i] for i, j in enumerate(source_data)])
df = dataframe_from_ordered_dict(l)