@@ -135,6 +135,16 @@ def json_normalize(data, record_path=None, meta=None,
135135 Examples
136136 --------
137137
138+ >>> from pandas.io.json import json_normalize
139+ >>> data = [{'id': 1, 'name': {'first': 'Coleen', 'last': 'Volk'}},
140+ ... {'name': {'given': 'Mose', 'family': 'Regner'}},
141+ ... {'id': 2, 'name': 'Faye Raker'}]
142+ >>> json_normalize(data)
143+ id name name.family name.first name.given name.last
144+ 0 1.0 NaN NaN Coleen NaN Volk
145+ 1 NaN NaN Regner NaN Mose NaN
146+ 2 2.0 Faye Raker NaN NaN NaN NaN
147+
138148 >>> data = [{'state': 'Florida',
139149 ... 'shortname': 'FL',
140150 ... 'info': {
@@ -150,7 +160,6 @@ def json_normalize(data, record_path=None, meta=None,
150160 ... },
151161 ... 'counties': [{'name': 'Summit', 'population': 1234},
152162 ... {'name': 'Cuyahoga', 'population': 1337}]}]
153- >>> from pandas.io.json import json_normalize
154163 >>> result = json_normalize(data, 'counties', ['state', 'shortname',
155164 ... ['info', 'governor']])
156165 >>> result
0 commit comments