I am trying to use panads to manage data that I am pulling from an API. The data has one column that is a nested list and I am trying to extract it out to their own columns.
The data looks like this so far:
id | displayName | propertiesRegistered | createdDateTime | |
---|---|---|---|---|
00000000-0000-0000-0000-000000000000 | joe.user@email.com | User, Joe | ['address', 'mobilePhone', 'officePhone'] | 2023-08-19T15:00:00.00Z |
The desired output would look like:
id | displayName | address | mobilePhone | officePhone | homePhone | createdDateTime | |
---|---|---|---|---|---|---|---|
00000000-0000-0000-0000-000000000000 | joe.user@email.com | User, Joe | TRUE | TRUE | TRUE | FALSE | 2023-08-19T15:00:00.00Z |
I've tried expanding, series, and pivot tables but cannot seem to figure it out. And not sure I'm even phrasing my question correctly in my searching. A lot of people and examples have the data made into additional rows, which I was able to do, but getting it to a single row is ideal.
Any help is greatly appreciated.