ich mit einer JSON-Antwort arbeite, die wie ein viel verschachtelter Wörterbuch unten formatiert ist:Python JSON Pandas Dataframe
{u'addresses': [],
u'application_ids': [20855193],
u'applications': [{u'answers': [{u'answer': u'Indeed ',
u'question': u'How did you hear?'}],
u'applied_at': u'2015-10-29T22:19:04.925Z',
u'candidate_id': 9999999,
u'credited_to': None,
u'current_stage': {u'id': 9999999,
u'name': u'Application Review'},
u'id': 9999999,
u'jobs': [{u'id': 9999999,u'name': u'ENGINEER'}],
u'last_activity_at': u'2015-10-29T22:19:04.767Z',
u'prospect': False,
u'rejected_at': None,
u'rejection_details': None,
u'rejection_reason': None,
u'source': {u'id': 7, u'public_name': u'Indeed'},
u'status': u'active'}],
u'attachments': [{u'filename': u'Jason_Bourne.pdf',
u'type': u'resume',
u'url': u'https://resumeURL'}],
u'company': None,
u'coordinator': {u'employee_id': None,
u'id': 9999999,
u'name': u'Batman_Robin'},
u'email_addresses': [{u'type': u'personal',
u'value': u'[email protected]'}],
u'first_name': u'Jason',
u'id': 9999999,
u'last_activity': u'2015-10-29T22:19:04.767Z',
u'last_name': u'Bourne',
u'website_addresses': []}
ich die JSON in eine Tabelle zu glätten bin versucht und habe folgendes Beispiel auf gefunden die Pandas Dokumentation:
http://pandas.pydata.org/pandas-docs/version/0.17.0/generated/pandas.io.json.json_normalize.html
Aus irgendeinem Grund alle Daten direkt unter dem Header gibt ‚Anwendungen‘ als ein Zeichen pro Zeile. wenn ich nenne zum Beispiel:
timeapplied = json_normalize(data,['applications', ['applied_at']])
ich:
0
0 2
1 0
2 1
3 5
4 -
5 1
6 0
7 -
8 2
9 9
10 T
11 2
12 2
13 :
14 1
15 9
16 :
17 0
18 4
19 .
20 9
21 2
22 5
23 Z
Gibt es eine Möglichkeit, um diese so kann ich die Normalisieren-Funktion nutzen?
Danke!
Was ist Ihre gewünschte Ausgabe? – Psidom