Getting Attribute Error: Module 'Pandas' Has No Attribute 'Json_Normalize'

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

Try to

from pandas import json_normalize

json_normalize is coming from pandas directly

So what you have to import is:

from pandas import json_normalize
9

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest