Getting attribute error : module 'pandas' has no attribute 'json_normalize'

Viewed 3308

I was trying to use json_normalize function to flatten the JSON data. While calling the function I am getting this exception in Python;

AttributeError: module 'pandas' has no attribute 'json_normalize'

I'm using Python 3.8-Azure ML and used this;

from pandas.io.json import json_normalize

How can we import this?

2 Answers

json_normalize is coming from pandas directly

So what you have to import is:

from pandas import json_normalize
Related