I'm trying to put data retrieved via an API into a pandas dataframe. I managed to get the data but I'm having issues in converting json into a pandas dataframe. This is the code that I have now:
import requests
import pandas as pd
r = requests.get('https://pokeapi.co/api/v2/pokemon?limit=1200')
data = r.text
df = pd.DataFrame.from_dict(data)
I tried to generate a dataframe but I get the error:
ValueError: DataFrame constructor not properly called!