0

The metadata column contains nested dictionaries in each row. Data looks like this:

id_x          source    metadata
144275745e    html      {}
e87357867f    html      {}

I don't know the precise structure of a dictionary but I do know it is a nested dictionary. Before extracting the values that I need I want to see how the dictionary looks like - it is in json format. Is there a way to just print out the value from metadata column for 144275745e id_x?

Thank you.

dspencer
  • 4,297
  • 4
  • 22
  • 43
Chique_Code
  • 1,422
  • 3
  • 23
  • 49
  • 1
    Your question isn't clear. There are no nested dictionaries in what you provided. Are you saying that the `metadata` column contains nested dicts in each row? Can you [edit] to provide a more complete sample input and an example of your desired output? – G. Anderson Feb 06 '20 at 21:49
  • Are you just asking how to access a particular element of the DataFrame? If so, there are plenty of resources on the subject already. – AMC Feb 06 '20 at 21:51
  • In light of your answer, this is clearly a duplicate of https://stackoverflow.com/q/16729574/11301900. – AMC Feb 07 '20 at 02:29

1 Answers1

0
val = df['metadata'].values[0]
MarianD
  • 13,096
  • 12
  • 42
  • 54
Chique_Code
  • 1,422
  • 3
  • 23
  • 49