0

I have a pyhton dict object which gives back the following data.

Id = 1234
LastModifiedDate = 2022-05-17T13:17:57.000+0000
RecordType.Name = OrderedDict([('attributes', OrderedDict([('type', 'RecordType'), ('url', '/abc/data/v4711/uobjects/RecordType/12345678AU')])), ('Name', 'Paul')])

I write the data from dict into pandas dataframe and it works for this columns.

df_one_0 = df_one_1[['Id', 'LastModifiedDate']]

But from the column RecordType.Name I just need the Name key which is Paul. I get this key value with.

df_one_0 = df_one_1.RecordType[0]['Name']

But how can I bring these both "selects" together?

This for example is not working:

df_one_0 = df_one_1[['Id', 'LastModifiedDate', RecordType[0]['Name']]]
HansMuff
  • 283
  • 1
  • 5
  • 17
  • Does this answer your question? [How do I select rows from a DataFrame based on column values?](https://stackoverflow.com/questions/17071871/how-do-i-select-rows-from-a-dataframe-based-on-column-values) – Nayem Jaman Tusher May 18 '22 at 09:46

0 Answers0