@@ -284,6 +284,30 @@ def test_shallow_nested(self):
284
284
expected = DataFrame (ex_data , columns = result .columns )
285
285
tm .assert_frame_equal (result , expected )
286
286
287
+ def test_nested_meta_path_with_nested_record_path (self , state_data ):
288
+ # GH 27220
289
+ result = json_normalize (
290
+ data = state_data ,
291
+ record_path = ["counties" ],
292
+ meta = ["state" , "shortname" , ["info" , "governor" ]],
293
+ errors = "ignore" ,
294
+ )
295
+
296
+ ex_data = {
297
+ "name" : ["Dade" , "Broward" , "Palm Beach" , "Summit" , "Cuyahoga" ],
298
+ "population" : [12345 , 40000 , 60000 , 1234 , 1337 ],
299
+ "state" : ["Florida" ] * 3 + ["Ohio" ] * 2 ,
300
+ "shortname" : ["FL" ] * 3 + ["OH" ] * 2 ,
301
+ "info.governor" : ["Rick Scott" ] * 3 + ["John Kasich" ] * 2 ,
302
+ }
303
+
304
+ expected = DataFrame (
305
+ ex_data ,
306
+ columns = ["name" , "population" , "state" , "shortname" , "info.governor" ],
307
+ )
308
+
309
+ tm .assert_frame_equal (result , expected )
310
+
287
311
def test_meta_name_conflict (self ):
288
312
data = [
289
313
{
0 commit comments