How to convert json from url into pandas dataframe?

Question:

with this code:

import pandas as pd
import requests
import json

url = 'https://www.loves.com/api/sitecore/StoreSearch/SearchStores'

#get the data from url
response = requests.get(url).json()

df = pd.read_json(url)

df1 = pd.json_normalize(response)

both DFs return this:
enter image description here

This is what the response looks like
enter image description here

How to get normal pandas dataframe?

Asked By: oToMaTiX

||

Answers:

Try it like this

import pandas as pd
import requests
import json

url = 'https://www.loves.com/api/sitecore/StoreSearch/SearchStores'

#get the data from url
response = requests.get(url).json()

df1 = pd.json_normalize(response, record_path=['Points'])
Answered By: Krzysztof Chojnacki

I found the answer, this made the trick

df1 = pd.json_normalize(response, record_path=['Points'])
Answered By: oToMaTiX