从Python的嵌套字典到平坦的Pandas数据框

huangapple go评论54阅读模式
英文:

From Python's nested dictionary to flat Pandas dataframe

问题

I have a nested dictionary of the public information of employment history of people and I would like to construct the panel data similar to the following table.

Here is the nested dictionary.

The nested dictionary for person 1 in the above table is as follows.

{
    'basicInformation': {
        'individualId': 6092353,
        'firstName': 'A',
        'middleName': 'ANTHONY',
        'lastName': 'OLIVETTI',
        'otherNames': ['ALBERT A OLIVETTI', 'ALBERT ANTHONY OLIVETTI', 'ANTHONY A OLIVETTI', 'ANTHONY  OLIVETTI'],
        'bcScope': 'Active',
        'iaScope': 'Active',
        'daysInIndustryCalculatedDate': '10/16/2013'
    },
    'currentEmployments': [
        {
            'firmId': 8174,
            'firmName': 'UBS FINANCIAL SERVICES INC.',
            'iaOnly': 'N',
            'registrationBeginDate': '10/17/2013',
            'firmBCScope': 'ACTIVE',
            'firmIAScope': 'ACTIVE',
            'iaSECNumber': '7163',
            'iaSECNumberType': '801',
            'bdSECNumber': '16267',
            'branchOfficeLocations': [
                {
                    'locatedAtFlag': 'Y',
                    'supervisedFromFlag': 'N',
                    'privateResidenceFlag': 'N',
                    'branchOfficeId': '88789',
                    'street1': '1251 AVE OF THE AMERICAS',
                    'street2': '2ND FLOOR',
                    'city': 'NEW YORK',
                    'cityAlias': ['MANHATTAN', 'NEW YORK', 'NEW YORK CITY', 'NY', 'NY CITY', 'NYC'],
                    'state': 'NY',
                    'country': 'United States',
                    'zipCode': '10020',
                    'latitude': '40.758908',
                    'longitude': '-73.97902',
                    'geoLocation': '40.758908,-73.97902',
                    'nonRegisteredOfficeFlag': 'N',
                    'elaBeginDate': '07/15/2013'
                }
            ]
        }
    ],
    'currentIAEmployments': [
        {
            'firmId': 8174,
            'firmName': 'UBS FINANCIAL SERVICES INC.',
            'iaOnly': 'Y',
            'registrationBeginDate': '2/24/2014',
            'firmBCScope': 'ACTIVE',
            'firmIAScope': 'ACTIVE',
            'iaSECNumber': '7163',
            'iaSECNumberType': '801',
            'bdSECNumber': '16267',
            'branchOfficeLocations': [
                {
                    'locatedAtFlag': 'Y',
                    'supervisedFromFlag': 'N',
                    'privateResidenceFlag': 'N',
                    'branchOfficeId': '88789',
                    'street1': '1251 AVE OF THE AMERICAS',
                    'street2': '2ND FLOOR',
                    'city': 'NEW YORK',
                    'cityAlias': ['MANHATTAN', 'NEW YORK', 'NEW YORK CITY', 'NY', 'NY CITY', 'NYC'],
                    'state': 'NY',
                    'country': 'United States',
                    'zipCode': '10020',
                    'latitude': '40.758908',
                    'longitude': '-73.97902',
                    'geoLocation': '40.758908,-73.97902',
                    'nonRegisteredOfficeFlag': 'N',
                    'elaBeginDate': '07/15/2013'
                }
            ]
        }
    ],
    'previousEmployments': [],
    'previousIAEmployments': [],
    'disclosureFlag': 'N',
    'iaDisclosureFlag': 'N',
    'disclosures': [],
    'examsCount': {
        'stateExamCount': 1,
        'principalExamCount': 0,
        'productExamCount': 3
    },
    'stateExamCategory': [
        {
            'examCategory': 'Series 66',
            'examName': 'Uniform Combined State Law Examination',
            'examTakenDate': '2/18/2014',
            'examScope': 'BOTH'
        }
    ],
    'principalExamCategory': [],
    'productExamCategory': [
        {
            'examCategory': 'SIE',
            'examName': 'Securities Industry Essentials Examination',
            'examTakenDate': '10/1/2018',
            'examScope': 'BC'
        },
        {
            'examCategory': 'Series 3',
            'examName': 'National Commodity Futures Examination',
            'examTakenDate': '10/27/2014',
            'examScope': 'BC'
        },
        {
            'examCategory': 'Series 7',
            'examName': 'General Securities Representative Examination',
            'examTaken

<details>
<summary>英文:</summary>

I have a nested dictionary of the public information of employment history of people and I would like to construct the panel data similar to the following table.

[![enter image description here][1]][1]


Here is the  nested dictionary.

The nested dictionary for person 1 in the above table is as follows.


    {&#39;basicInformation&#39;: {&#39;individualId&#39;: 6092353,
    &#39;firstName&#39;: &#39;A&#39;,&#39;middleName&#39;: &#39;ANTHONY&#39;,&#39;lastName&#39;: &#39;OLIVETTI&#39;,
    &#39;otherNames&#39;: [&#39;ALBERT A OLIVETTI&#39;,
    &#39;ALBERT ANTHONY OLIVETTI&#39;,
    &#39;ANTHONY A OLIVETTI&#39;,
    &#39;ANTHONY  OLIVETTI&#39;],
    &#39;bcScope&#39;: &#39;Active&#39;,
    &#39;iaScope&#39;: &#39;Active&#39;,
    &#39;daysInIndustryCalculatedDate&#39;: &#39;10/16/2013&#39;},
    &#39;currentEmployments&#39;: [{&#39;firmId&#39;: 8174,
    &#39;firmName&#39;: &#39;UBS FINANCIAL SERVICES INC.&#39;,
    &#39;iaOnly&#39;: &#39;N&#39;,
    &#39;registrationBeginDate&#39;: &#39;10/17/2013&#39;,
    &#39;firmBCScope&#39;: &#39;ACTIVE&#39;,
    &#39;firmIAScope&#39;: &#39;ACTIVE&#39;,
    &#39;iaSECNumber&#39;: &#39;7163&#39;,
    &#39;iaSECNumberType&#39;: &#39;801&#39;,
    &#39;bdSECNumber&#39;: &#39;16267&#39;,
    &#39;branchOfficeLocations&#39;: [{&#39;locatedAtFlag&#39;: &#39;Y&#39;,
    &#39;supervisedFromFlag&#39;: &#39;N&#39;,
    &#39;privateResidenceFlag&#39;: &#39;N&#39;,
    &#39;branchOfficeId&#39;: &#39;88789&#39;,
    &#39;street1&#39;: &#39;1251 AVE OF THE AMERICAS&#39;,
    &#39;street2&#39;: &#39;2ND FLOOR&#39;,
    &#39;city&#39;: &#39;NEW YORK&#39;,
    &#39;cityAlias&#39;: [&#39;MANHATTAN&#39;,
    &#39;NEW YORK&#39;,
    &#39;NEW YORK CITY&#39;,
    &#39;NY&#39;,
    &#39;NY CITY&#39;,
    &#39;NYC&#39;],
    &#39;state&#39;: &#39;NY&#39;,
    &#39;country&#39;: &#39;United States&#39;,
    &#39;zipCode&#39;: &#39;10020&#39;,
    &#39;latitude&#39;: &#39;40.758908&#39;,
    &#39;longitude&#39;: &#39;-73.97902&#39;,
    &#39;geoLocation&#39;: &#39;40.758908,-73.97902&#39;,
    &#39;nonRegisteredOfficeFlag&#39;: &#39;N&#39;,
    &#39;elaBeginDate&#39;: &#39;07/15/2013&#39;}]}],
    &#39;currentIAEmployments&#39;: [{&#39;firmId&#39;: 8174,
    &#39;firmName&#39;: &#39;UBS FINANCIAL SERVICES INC.&#39;,
    &#39;iaOnly&#39;: &#39;Y&#39;,
    &#39;registrationBeginDate&#39;: &#39;2/24/2014&#39;,
    &#39;firmBCScope&#39;: &#39;ACTIVE&#39;,
    &#39;firmIAScope&#39;: &#39;ACTIVE&#39;,
    &#39;iaSECNumber&#39;: &#39;7163&#39;,
    &#39;iaSECNumberType&#39;: &#39;801&#39;,
    &#39;bdSECNumber&#39;: &#39;16267&#39;,
    &#39;branchOfficeLocations&#39;: [{&#39;locatedAtFlag&#39;: &#39;Y&#39;,
     &#39;supervisedFromFlag&#39;: &#39;N&#39;,
     &#39;privateResidenceFlag&#39;: &#39;N&#39;,
     &#39;branchOfficeId&#39;: &#39;88789&#39;,
     &#39;street1&#39;: &#39;1251 AVE OF THE AMERICAS&#39;,
     &#39;street2&#39;: &#39;2ND FLOOR&#39;,
     &#39;city&#39;: &#39;NEW YORK&#39;,
     &#39;cityAlias&#39;: [&#39;MANHATTAN&#39;,
      &#39;NEW YORK&#39;,
      &#39;NEW YORK CITY&#39;,
      &#39;NY&#39;,
      &#39;NY CITY&#39;,
      &#39;NYC&#39;],
     &#39;state&#39;: &#39;NY&#39;,
     &#39;country&#39;: &#39;United States&#39;,
     &#39;zipCode&#39;: &#39;10020&#39;,
     &#39;latitude&#39;: &#39;40.758908&#39;,
     &#39;longitude&#39;: &#39;-73.97902&#39;,
     &#39;geoLocation&#39;: &#39;40.758908,-73.97902&#39;,
     &#39;nonRegisteredOfficeFlag&#39;: &#39;N&#39;,
     &#39;elaBeginDate&#39;: &#39;07/15/2013&#39;}]}],
     &#39;previousEmployments&#39;: [],
     &#39;previousIAEmployments&#39;: [],
     &#39;disclosureFlag&#39;: &#39;N&#39;,
     &#39;iaDisclosureFlag&#39;: &#39;N&#39;,
     &#39;disclosures&#39;: [],
     &#39;examsCount&#39;: {&#39;stateExamCount&#39;: 1,
     &#39;principalExamCount&#39;: 0,
     &#39;productExamCount&#39;: 3},
     &#39;stateExamCategory&#39;: [{&#39;examCategory&#39;: &#39;Series 66&#39;,
     &#39;examName&#39;: &#39;Uniform Combined State Law Examination&#39;,
     &#39;examTakenDate&#39;: &#39;2/18/2014&#39;,
     &#39;examScope&#39;: &#39;BOTH&#39;}],
     &#39;principalExamCategory&#39;: [],
     &#39;productExamCategory&#39;: [{&#39;examCategory&#39;: &#39;SIE&#39;,
     &#39;examName&#39;: &#39;Securities Industry Essentials Examination&#39;,
     &#39;examTakenDate&#39;: &#39;10/1/2018&#39;,
     &#39;examScope&#39;: &#39;BC&#39;},
     {&#39;examCategory&#39;: &#39;Series 3&#39;,
     &#39;examName&#39;: &#39;National Commodity Futures Examination&#39;,
     &#39;examTakenDate&#39;: &#39;10/27/2014&#39;,
     &#39;examScope&#39;: &#39;BC&#39;},
     {&#39;examCategory&#39;: &#39;Series 7&#39;,
     &#39;examName&#39;: &#39;General Securities Representative Examination&#39;,
     &#39;examTakenDate&#39;: &#39;10/17/2013&#39;,
     &#39;examScope&#39;: &#39;BC&#39;}],
     &#39;registrationCount&#39;: {&#39;approvedSRORegistrationCount&#39;: 10,
     &#39;approvedFinraRegistrationCount&#39;: 1,
     &#39;approvedStateRegistrationCount&#39;: 7,
     &#39;approvedIAStateRegistrationCount&#39;: 2},
     &#39;registeredStates&#39;: [{&#39;state&#39;: &#39;California&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;5/31/2022&#39;},
     {&#39;state&#39;: &#39;Connecticut&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;2/26/2014&#39;},
     {&#39;state&#39;: &#39;Florida&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;2/26/2014&#39;},
     {&#39;state&#39;: &#39;New Jersey&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;1/23/2014&#39;},
     {&#39;state&#39;: &#39;New Jersey&#39;,
     &#39;regScope&#39;: &#39;IA&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;2/24/2014&#39;},
     {&#39;state&#39;: &#39;New York&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;2/18/2014&#39;},
     {&#39;state&#39;: &#39;New York&#39;,
     &#39;regScope&#39;: &#39;IA&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;10/26/2021&#39;},
     {&#39;state&#39;: &#39;North Carolina&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;5/31/2022&#39;},
     {&#39;state&#39;: &#39;Pennsylvania&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;2/26/2014&#39;}],
     &#39;registeredSROs&#39;: [{&#39;sro&#39;: &#39;BOX Exchange LLC&#39;, &#39;status&#39;: &#39;APPROVED&#39;},
     {&#39;sro&#39;: &#39;Cboe Exchange, Inc.&#39;, &#39;status&#39;: &#39;APPROVED&#39;},
     {&#39;sro&#39;: &#39;FINRA&#39;, &#39;status&#39;: &#39;APPROVED&#39;},
     {&#39;sro&#39;: &#39;NYSE American LLC&#39;, &#39;status&#39;: &#39;APPROVED&#39;},
     {&#39;sro&#39;: &#39;NYSE Arca, Inc.&#39;, &#39;status&#39;: &#39;APPROVED&#39;},
     {&#39;sro&#39;: &#39;NYSE Chicago, Inc.&#39;, &#39;status&#39;: &#39;APPROVED&#39;},
     {&#39;sro&#39;: &#39;Nasdaq ISE, LLC&#39;, &#39;status&#39;: &#39;APPROVED&#39;},
     {&#39;sro&#39;: &#39;Nasdaq PHLX LLC&#39;, &#39;status&#39;: &#39;APPROVED&#39;},
     {&#39;sro&#39;: &#39;Nasdaq Stock Market&#39;, &#39;status&#39;: &#39;APPROVED&#39;},
     {&#39;sro&#39;: &#39;New York Stock Exchange&#39;, &#39;status&#39;: &#39;APPROVED&#39;}],
     &#39;brokerDetails&#39;: {&#39;hasBCComments&#39;: &#39;N&#39;,
     &#39;hasIAComments&#39;: &#39;N&#39;,
     &#39;legacyReportStatusDescription&#39;: &#39;Not Requested&#39;}}



The nested dictionary for person 2 in the above table is as follows.




    {&#39;basicInformation&#39;: {&#39;individualId&#39;: 2652161,
    &#39;firstName&#39;: &#39;ALBERT&#39;,
    &#39;middleName&#39;: &#39;B&#39;,
    &#39;lastName&#39;: &#39;HORMAN&#39;,
    &#39;otherNames&#39;: [&#39;A B HORMAN&#39;, &#39;ALBERT WILLIAM HORMAN&#39;, &#39;BILL  HORMAN&#39;],
    &#39;bcScope&#39;: &#39;Active&#39;,
    &#39;iaScope&#39;: &#39;Active&#39;,
    &#39;daysInIndustryCalculatedDate&#39;: &#39;9/17/1995&#39;},
    &#39;currentEmployments&#39;: [{&#39;firmId&#39;: 7784,
    &#39;firmName&#39;: &#39;FIDELITY BROKERAGE SERVICES LLC&#39;,
    &#39;iaOnly&#39;: &#39;N&#39;,
    &#39;registrationBeginDate&#39;: &#39;1/1/2008&#39;,
    &#39;firmBCScope&#39;: &#39;ACTIVE&#39;,
    &#39;firmIAScope&#39;: &#39;NOTINSCOPE&#39;,
    &#39;bdSECNumber&#39;: &#39;23292&#39;,
    &#39;branchOfficeLocations&#39;: [{&#39;locatedAtFlag&#39;: &#39;Y&#39;,
    &#39;supervisedFromFlag&#39;: &#39;N&#39;,
    &#39;privateResidenceFlag&#39;: &#39;N&#39;,
    &#39;branchOfficeId&#39;: &#39;369366&#39;,
     &#39;street1&#39;: &#39;825 EAST 1180 SOUTH&#39;,
     &#39;city&#39;: &#39;AMERICAN FORK&#39;,
     &#39;cityAlias&#39;: [&#39;AM FORK&#39;, &#39;AMERICAN FORK&#39;, &#39;HIGHLAND&#39;, &#39;TIMPANOGOS&#39;],
     &#39;state&#39;: &#39;UT&#39;,
     &#39;country&#39;: &#39;United States&#39;,
     &#39;zipCode&#39;: &#39;84003&#39;,
     &#39;latitude&#39;: &#39;40.405984&#39;,
     &#39;longitude&#39;: &#39;-111.82903&#39;,
     &#39;geoLocation&#39;: &#39;40.405984,-111.82903&#39;,
     &#39;nonRegisteredOfficeFlag&#39;: &#39;N&#39;,
     &#39;elaBeginDate&#39;: &#39;07/04/2022&#39;}]}],
     &#39;currentIAEmployments&#39;: [{&#39;firmId&#39;: 288590,
     &#39;firmName&#39;: &#39;FIDELITY PERSONAL AND WORKPLACE ADVISORS&#39;,
     &#39;iaOnly&#39;: &#39;Y&#39;,
     &#39;registrationBeginDate&#39;: &#39;7/13/2018&#39;,
     &#39;firmBCScope&#39;: &#39;NOTINSCOPE&#39;,
     &#39;firmIAScope&#39;: &#39;ACTIVE&#39;,
     &#39;iaSECNumber&#39;: &#39;112027&#39;,
     &#39;iaSECNumberType&#39;: &#39;801&#39;,
     &#39;branchOfficeLocations&#39;: [{&#39;locatedAtFlag&#39;: &#39;Y&#39;,
     &#39;supervisedFromFlag&#39;: &#39;N&#39;,
     &#39;privateResidenceFlag&#39;: &#39;N&#39;,
     &#39;street1&#39;: &#39;245 SUMMER STREET, V2A&#39;,
     &#39;city&#39;: &#39;BOSTON&#39;,
     &#39;cityAlias&#39;: [&#39;BOSTON&#39;],
     &#39;state&#39;: &#39;MA&#39;,
     &#39;country&#39;: &#39;United States&#39;,
     &#39;zipCode&#39;: &#39;02210&#39;,
     &#39;latitude&#39;: &#39;42.346571&#39;,
     &#39;longitude&#39;: &#39;-71.039563&#39;,
     &#39;geoLocation&#39;: &#39;42.346571,-71.039563&#39;,
     &#39;nonRegisteredOfficeFlag&#39;: &#39;Y&#39;,
     &#39;elaBeginDate&#39;: &#39;07/13/2018&#39;}]}],
     &#39;previousEmployments&#39;: [{&#39;iaOnly&#39;: &#39;N&#39;,
     &#39;bdSECNumber&#39;: &#39;35097&#39;,
     &#39;firmId&#39;: 17507,
     &#39;firmName&#39;: &#39;FIDELITY INVESTMENTS INSTITUTIONAL SERVICES COMPANY, INC.&#39;,
     &#39;street1&#39;: &#39;49 NORTH 400 WEST&#39;,
      &#39;city&#39;: &#39;SALT LAKE CITY&#39;,
      &#39;state&#39;: &#39;UT&#39;,
      &#39;zipCode&#39;: &#39;84101&#39;,
      &#39;registrationBeginDate&#39;: &#39;1/3/2001&#39;,
     &#39;registrationEndDate&#39;: &#39;1/1/2008&#39;,
     &#39;firmBCScope&#39;: &#39;ACTIVE&#39;,
     &#39;firmIAScope&#39;: &#39;NOTINSCOPE&#39;},
     {&#39;iaOnly&#39;: &#39;N&#39;,
     &#39;bdSECNumber&#39;: &#39;23292&#39;,
      &#39;firmId&#39;: 7784,
     &#39;firmName&#39;: &#39;FIDELITY BROKERAGE SERVICES LLC&#39;,
     &#39;street1&#39;: &#39;900 SALEM STREET&#39;,
     &#39;city&#39;: &#39;SMITHFIELD&#39;,
     &#39;state&#39;: &#39;RI&#39;,
     &#39;country&#39;: &#39;UNITED STATES&#39;,
     &#39;zipCode&#39;: &#39;02917&#39;,
     &#39;registrationBeginDate&#39;: &#39;9/18/1995&#39;,
     &#39;registrationEndDate&#39;: &#39;1/4/2001&#39;,
     &#39;firmBCScope&#39;: &#39;ACTIVE&#39;,
     &#39;firmIAScope&#39;: &#39;NOTINSCOPE&#39;}],
     &#39;previousIAEmployments&#39;: [{&#39;iaOnly&#39;: &#39;Y&#39;,
     &#39;iaSECNumber&#39;: &#39;13243&#39;,
     &#39;iaSECNumberType&#39;: &#39;801&#39;,
     &#39;firmId&#39;: 104555,
     &#39;firmName&#39;: &#39;STRATEGIC ADVISERS LLC&#39;,
     &#39;street1&#39;: &#39;49 NORTH 400 WEST&#39;,
     &#39;city&#39;: &#39;SALT LAKE CITY&#39;,
     &#39;state&#39;: &#39;UT&#39;,
     &#39;country&#39;: &#39;United States&#39;,
     &#39;zipCode&#39;: &#39;84101&#39;,
     &#39;registrationBeginDate&#39;: &#39;2/15/2008&#39;,
     &#39;registrationEndDate&#39;: &#39;7/13/2018&#39;,
     &#39;firmBCScope&#39;: &#39;NOTINSCOPE&#39;,
     &#39;firmIAScope&#39;: &#39;ACTIVE&#39;}],
     &#39;disclosureFlag&#39;: &#39;N&#39;,
     &#39;iaDisclosureFlag&#39;: &#39;N&#39;,
     &#39;disclosures&#39;: [],
     &#39;examsCount&#39;: {&#39;stateExamCount&#39;: 2,
     &#39;principalExamCount&#39;: 0,
     &#39;productExamCount&#39;: 2},
     &#39;stateExamCategory&#39;: [{&#39;examCategory&#39;: &#39;Series 66&#39;,
     &#39;examName&#39;: &#39;Uniform Combined State Law Examination&#39;,
     &#39;examTakenDate&#39;: &#39;2/26/2008&#39;,
     &#39;examScope&#39;: &#39;BOTH&#39;},
     {&#39;examCategory&#39;: &#39;Series 63&#39;,
     &#39;examName&#39;: &#39;Uniform Securities Agent State Law Examination&#39;,
     &#39;examTakenDate&#39;: &#39;9/7/1995&#39;,
     &#39;examScope&#39;: &#39;BC&#39;}],
     &#39;principalExamCategory&#39;: [],
     &#39;productExamCategory&#39;: [{&#39;examCategory&#39;: &#39;SIE&#39;,
     &#39;examName&#39;: &#39;Securities Industry Essentials Examination&#39;,
     &#39;examTakenDate&#39;: &#39;10/1/2018&#39;,
     &#39;examScope&#39;: &#39;BC&#39;},
     {&#39;examCategory&#39;: &#39;Series 7&#39;,
     &#39;examName&#39;: &#39;General Securities Representative Examination&#39;,
     &#39;examTakenDate&#39;: &#39;9/16/1995&#39;,
     &#39;examScope&#39;: &#39;BC&#39;}],
     &#39;registrationCount&#39;: {&#39;approvedSRORegistrationCount&#39;: 2,
     &#39;approvedFinraRegistrationCount&#39;: 1,
     &#39;approvedStateRegistrationCount&#39;: 52,
     &#39;approvedIAStateRegistrationCount&#39;: 2},
     &#39;registeredStates&#39;: [{&#39;state&#39;: &#39;Alabama&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;1/1/2008&#39;},
     {&#39;state&#39;: &#39;Alaska&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;1/1/2008&#39;},
     {&#39;state&#39;: &#39;Arizona&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;1/1/2008&#39;},
     {&#39;state&#39;: &#39;Arkansas&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;1/1/2008&#39;},
     {&#39;state&#39;: &#39;California&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;1/1/2008&#39;},
     {&#39;state&#39;: &#39;Colorado&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;1/1/2008&#39;},
     {&#39;state&#39;: &#39;Connecticut&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Delaware&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;District of Columbia&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Florida&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Georgia&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Hawaii&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Idaho&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Illinois&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Indiana&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Iowa&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Kansas&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Kentucky&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Louisiana&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
     {&#39;state&#39;: &#39;Maine&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
     &#39;status&#39;: &#39;APPROVED&#39;,
     &#39;regDate&#39;: &#39;1/1/2008&#39;},
     {&#39;state&#39;: &#39;Maryland&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Massachusetts&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Michigan&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Minnesota&#39;,
     &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Mississippi&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Missouri&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Montana&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
    {&#39;state&#39;: &#39;Nebraska&#39;,
    &#39;regScope&#39;: &#39;BC&#39;,
    &#39;status&#39;: &#39;APPROVED&#39;,
    &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;Nevada&#39;,
      &#39;regScope&#39;: &#39;BC&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
       {&#39;state&#39;: &#39;New Hampshire&#39;,
       &#39;regScope&#39;: &#39;BC&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;New Jersey&#39;,
      &#39;regScope&#39;: &#39;BC&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;New Mexico&#39;,
      &#39;regScope&#39;: &#39;BC&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;New York&#39;,
      &#39;regScope&#39;: &#39;BC&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;North Carolina&#39;,
       &#39;regScope&#39;: &#39;BC&#39;,
       &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;North Dakota&#39;,
      &#39;regScope&#39;: &#39;BC&#39;,
       &#39;status&#39;: &#39;APPROVED&#39;,
       &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;Ohio&#39;,
      &#39;regScope&#39;: &#39;BC&#39;,
       &#39;status&#39;: &#39;APPROVED&#39;,
       &#39;regDate&#39;: &#39;1/1/2008&#39;},
       {&#39;state&#39;: &#39;Oklahoma&#39;,
       &#39;regScope&#39;: &#39;BC&#39;,
       &#39;status&#39;: &#39;APPROVED&#39;,
       &#39;regDate&#39;: &#39;1/1/2008&#39;},
       {&#39;state&#39;: &#39;Oregon&#39;,
       &#39;regScope&#39;: &#39;BC&#39;,
       &#39;status&#39;: &#39;APPROVED&#39;,
       &#39;regDate&#39;: &#39;1/1/2008&#39;},
       {&#39;state&#39;: &#39;Pennsylvania&#39;,
       &#39;regScope&#39;: &#39;BC&#39;,
       &#39;status&#39;: &#39;APPROVED&#39;,
       &#39;regDate&#39;: &#39;1/1/2008&#39;},
       {&#39;state&#39;: &#39;Puerto Rico&#39;,
       &#39;regScope&#39;: &#39;BC&#39;,
       &#39;status&#39;: &#39;APPROVED&#39;,
       &#39;regDate&#39;: &#39;1/1/2008&#39;},
       {&#39;state&#39;: &#39;Rhode Island&#39;,
       &#39;regScope&#39;: &#39;BC&#39;,
       &#39;status&#39;: &#39;APPROVED&#39;,
        &#39;regDate&#39;: &#39;1/1/2008&#39;},
       {&#39;state&#39;: &#39;South Carolina&#39;,
       &#39;regScope&#39;: &#39;BC&#39;,
       &#39;status&#39;: &#39;APPROVED&#39;,
       &#39;regDate&#39;: &#39;1/1/2008&#39;},
       {&#39;state&#39;: &#39;South Dakota&#39;,
       &#39;regScope&#39;: &#39;BC&#39;,
       &#39;status&#39;: &#39;APPROVED&#39;,
       &#39;regDate&#39;: &#39;1/1/2008&#39;},
       {&#39;state&#39;: &#39;Tennessee&#39;,
       &#39;regScope&#39;: &#39;BC&#39;,
       &#39;status&#39;: &#39;APPROVED&#39;,
       &#39;regDate&#39;: &#39;1/1/2008&#39;},
       {&#39;state&#39;: &#39;Texas&#39;,
        &#39;regScope&#39;: &#39;BC&#39;,
       &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;Texas&#39;,
      &#39;regScope&#39;: &#39;IA&#39;,
      &#39;status&#39;: &#39;APPROVED_RES&#39;,
      &#39;regDate&#39;: &#39;7/13/2018&#39;},
      {&#39;state&#39;: &#39;Utah&#39;,
       &#39;regScope&#39;: &#39;BC&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;Utah&#39;,
      &#39;regScope&#39;: &#39;IA&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;7/13/2018&#39;},
      {&#39;state&#39;: &#39;Vermont&#39;,
      &#39;regScope&#39;: &#39;BC&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;Virginia&#39;,
      &#39;regScope&#39;: &#39;BC&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;Washington&#39;,
      &#39;regScope&#39;: &#39;BC&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;West Virginia&#39;,
      &#39;regScope&#39;: &#39;BC&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;Wisconsin&#39;,
      &#39;regScope&#39;: &#39;BC&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;},
      {&#39;state&#39;: &#39;Wyoming&#39;,
      &#39;regScope&#39;: &#39;BC&#39;,
      &#39;status&#39;: &#39;APPROVED&#39;,
      &#39;regDate&#39;: &#39;1/1/2008&#39;}],
      &#39;registeredSROs&#39;: [{&#39;sro&#39;: &#39;FINRA&#39;, &#39;status&#39;: &#39;APPROVED&#39;},
      {&#39;sro&#39;: &#39;New York Stock Exchange&#39;, &#39;status&#39;: &#39;APPROVED&#39;}],
      &#39;brokerDetails&#39;: {&#39;hasBCComments&#39;: &#39;N&#39;,
      &#39;hasIAComments&#39;: &#39;N&#39;,
       &#39;legacyReportStatusDescription&#39;: &#39;Not Requested&#39;}}



What I have tried to do is to implement JSON normalize and JSON flatten. I have modified the code like this for person 1 and person 2

     import pandas as pds
     from flatten_json import flatten
     import json 

     #person_json is what I stored each person JSON. There are 2 
     #persons here. Thus, I do this two times to flatten the nested 
     #dictionary.

     person_temp = pds.json_normalize(flatten(person_json))

     # This line of the code is credited to Mr.Timeless
 
     data_frame = (person_temp.set_axis(person_temp.columns.str.split(&quot;_&quot;, n=1, 
     expand=True), axis=1).stack(1).droplevel(0))

     data_frame

Edited 1: Adding the captured photo of data_frame

The sample data_frame looks like this. I show only some parts of data_frame because the dimension is equal to 111 rows-by-16 columns.

[![enter image description here][2]][2]



What I get from the above code is a data frame. However, I try to manage to construct the panel data like the first captured photo that I presented. The issue I found here is to extract &#39;Year&#39; and &#39;City&#39; and to construct them into the (unbalanced) panel data set.

How should I do this?

Any suggestions/comments are welcome.

Thank you very much


  [1]: https://i.stack.imgur.com/QQjPP.png
  [2]: https://i.stack.imgur.com/Wkr1a.png

</details>


# 答案1
**得分**: 1

我建议采用不同的方法

首先定义以下辅助函数
```python
import pandas as pd

def flatten(data, new_data):
    for key, value in data.items():
        if isinstance(value, dict):
            flatten(value, new_data)
        if isinstance(value, str) or isinstance(value, int) or isinstance(value, list):
            new_data[key] = value
    return new_data

def deal_with_dicts(df, columns):
    for col in columns:
        df = pd.concat([df, pd.json_normalize(df[col])], axis=1)
        df = df.drop(columns=col)
    return df

def deal_with_duplicated_column_names(df):
    duplicates = {k: 1 for k in df.columns}
    new_cols = []
    for col in df.columns:
        if col in new_cols:
            new_cols.append(col + f"_{duplicates[col]}")
            duplicates[col] += 1
        else:
            new_cols.append(col)
    df.columns = new_cols
    return df

然后:

from collections import defaultdict

person1_data = flatten(person1, defaultdict(list))
df = pd.json_normalize(person1_data)

# ROUND 1
for col in df.columns:
    df = df.explode(col)  # 处理包含字典列表的列
df = df.reset_index(drop=True)
df = deal_with_dicts(
    df,
    [
        "currentEmployments",
        "currentIAEmployments",
        "stateExamCategory",
        "productExamCategory",
        "registeredStates",
        "registeredSROs",
    ],
)
df = deal_with_duplicated_column_names(df)

# ROUND 2
for col in df.columns:
    df = df.explode(col)  # 处理包含字典列表的列
df = df.reset_index(drop=True)
df = deal_with_dicts(df, ["branchOfficeLocations", "branchOfficeLocations_1"])
df = deal_with_duplicated_column_names(df)

# ROUND 3
for col in df.columns:
    df = df.explode(col)  # 处理包含字典列表的列
df = df.reset_index(drop=True)

这将为您提供来自 person1 字典的所有数据,并将其展平为一个数据框:

print(df.info())
# 输出结果

[38880 行 x 88 列]
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 38880 entries, 0 to 38879
Data columns (total 88 columns):
 #   Column                            Non-Null Count  Dtype
---  ------                            --------------  -----
 0   individualId                      38880 non-null  int64
 1   firstName                         38880 non-null  object
 2   middleName                        38880 non-null  object
 3   lastName                          38880 non-null  object
 4   otherNames                        38880 non-null  object
...
# 其他列信息
...
 87  elaBeginDate_1                    38880 non-null  object
dtypes: int64(10), object(78)
memory usage: 26.1+ MB
英文:

I suggest a different approach.

First, define the following helper functions:

import pandas as pd


def flatten(data, new_data):
    for key, value in data.items():
        if isinstance(value, dict):
            flatten(value, new_data)
        if isinstance(value, str) or isinstance(value, int) or isinstance(value, list):
            new_data[key] = value
    return new_data


def deal_with_dicts(df, columns):
    for col in columns:
        df = pd.concat([df, pd.json_normalize(df[col])], axis=1)
        df = df.drop(columns=col)
    return df


def deal_with_duplicated_column_names(df):
    duplicates = {k: 1 for k in df.columns}
    new_cols = []
    for col in df.columns:
        if col in new_cols:
            new_cols.append(col + f&quot;_{duplicates[col]}&quot;)
            duplicates[col] += 1
        else:
            new_cols.append(col)
    df.columns = new_cols
    return df

Then:

from collections import defaultdict


person1_data = flatten(person1, defaultdict(list))
df = pd.json_normalize(person1_data)

# ROUND 1
for col in df.columns:
    df = df.explode(col)  # Deal with lists of dicts
df = df.reset_index(drop=True)
df = deal_with_dicts(
    df,
    [
        &quot;currentEmployments&quot;,
        &quot;currentIAEmployments&quot;,
        &quot;stateExamCategory&quot;,
        &quot;productExamCategory&quot;,
        &quot;registeredStates&quot;,
        &quot;registeredSROs&quot;,
    ],
)
df = deal_with_duplicated_column_names(df)

# ROUND 2
for col in df.columns:
    df = df.explode(col)  # Deal with lists of dicts
df = df.reset_index(drop=True)
df = deal_with_dicts(df, [&quot;branchOfficeLocations&quot;, &quot;branchOfficeLocations_1&quot;])
df = deal_with_duplicated_column_names(df)

# ROUND 3
for col in df.columns:
    df = df.explode(col)  # Deal with lists of dicts
df = df.reset_index(drop=True)

Which gives you all the data from person1 dictionary as a flattened dataframe:

print(df.info())
# Output

[38880 rows x 88 columns]
&lt;class &#39;pandas.core.frame.DataFrame&#39;&gt;
RangeIndex: 38880 entries, 0 to 38879
Data columns (total 88 columns):
 #   Column                            Non-Null Count  Dtype
---  ------                            --------------  -----
 0   individualId                      38880 non-null  int64
 1   firstName                         38880 non-null  object
 2   middleName                        38880 non-null  object
 3   lastName                          38880 non-null  object
 4   otherNames                        38880 non-null  object
 5   bcScope                           38880 non-null  object
 6   iaScope                           38880 non-null  object
 7   daysInIndustryCalculatedDate      38880 non-null  object
 8   previousEmployments               0 non-null      object
 9   previousIAEmployments             0 non-null      object
 10  disclosureFlag                    38880 non-null  object
 11  iaDisclosureFlag                  38880 non-null  object
 12  disclosures                       0 non-null      object
 13  stateExamCount                    38880 non-null  int64
 14  principalExamCount                38880 non-null  int64
 15  productExamCount                  38880 non-null  int64
 16  principalExamCategory             0 non-null      object
 17  approvedSRORegistrationCount      38880 non-null  int64
 18  approvedFinraRegistrationCount    38880 non-null  int64
 19  approvedStateRegistrationCount    38880 non-null  int64
 20  approvedIAStateRegistrationCount  38880 non-null  int64
 21  hasBCComments                     38880 non-null  object
 22  hasIAComments                     38880 non-null  object
 23  legacyReportStatusDescription     38880 non-null  object
 24  firmId                            38880 non-null  int64
 25  firmName                          38880 non-null  object
 26  iaOnly                            38880 non-null  object
 27  registrationBeginDate             38880 non-null  object
 28  firmBCScope                       38880 non-null  object
 29  firmIAScope                       38880 non-null  object
 30  iaSECNumber                       38880 non-null  object
 31  iaSECNumberType                   38880 non-null  object
 32  bdSECNumber                       38880 non-null  object
 33  firmId_1                          38880 non-null  int64
 34  firmName_1                        38880 non-null  object
 35  iaOnly_1                          38880 non-null  object
 36  registrationBeginDate_1           38880 non-null  object
 37  firmBCScope_1                     38880 non-null  object
 38  firmIAScope_1                     38880 non-null  object
 39  iaSECNumber_1                     38880 non-null  object
 40  iaSECNumberType_1                 38880 non-null  object
 41  bdSECNumber_1                     38880 non-null  object
 42  examCategory                      38880 non-null  object
 43  examName                          38880 non-null  object
 44  examTakenDate                     38880 non-null  object
 45  examScope                         38880 non-null  object
 46  examCategory_1                    38880 non-null  object
 47  examName_1                        38880 non-null  object
 48  examTakenDate_1                   38880 non-null  object
 49  examScope_1                       38880 non-null  object
 50  state                             38880 non-null  object
 51  regScope                          38880 non-null  object
 52  status                            38880 non-null  object
 53  regDate                           38880 non-null  object
 54  sro                               38880 non-null  object
 55  status_1                          38880 non-null  object
 56  locatedAtFlag                     38880 non-null  object
 57  supervisedFromFlag                38880 non-null  object
 58  privateResidenceFlag              38880 non-null  object
 59  branchOfficeId                    38880 non-null  object
 60  street1                           38880 non-null  object
 61  street2                           38880 non-null  object
 62  city                              38880 non-null  object
 63  cityAlias                         38880 non-null  object
 64  state_1                           38880 non-null  object
 65  country                           38880 non-null  object
 66  zipCode                           38880 non-null  object
 67  latitude                          38880 non-null  object
 68  longitude                         38880 non-null  object
 69  geoLocation                       38880 non-null  object
 70  nonRegisteredOfficeFlag           38880 non-null  object
 71  elaBeginDate                      38880 non-null  object
 72  locatedAtFlag_1                   38880 non-null  object
 73  supervisedFromFlag_1              38880 non-null  object
 74  privateResidenceFlag_1            38880 non-null  object
 75  branchOfficeId_1                  38880 non-null  object
 76  street1_1                         38880 non-null  object
 77  street2_1                         38880 non-null  object
 78  city_1                            38880 non-null  object
 79  cityAlias_1                       38880 non-null  object
 80  state_2                           38880 non-null  object
 81  country_1                         38880 non-null  object
 82  zipCode_1                         38880 non-null  object
 83  latitude_1                        38880 non-null  object
 84  longitude_1                       38880 non-null  object
 85  geoLocation_1                     38880 non-null  object
 86  nonRegisteredOfficeFlag_1         38880 non-null  object
 87  elaBeginDate_1                    38880 non-null  object
dtypes: int64(10), object(78)
memory usage: 26.1+ MB

huangapple
  • 本文由 发表于 2023年6月2日 14:17:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/76387591.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定