How to create a Pandas DataFrame from Insightly JSON output
I want to create a simple table of my customers' names and addresses using Python and Pandas and just learning both.
I use Python requests.get to successfully access my customer list and put the JSON data into a variable "r"
r = requests.get('https://api.insight.ly/v2.2/Contacts', auth=('my_api_key','')) #<<=this works
Here's an example of a sample table (not using my JSON data), but works:
sales = [('Jones LLC', 150, 200,50),
('Blue Inc', 140,215,95)]
labels = ['account', 'Jan', 'Feb', 'Mar']
df= pd.DataFrame.from_records(sales, columns=labels) #<==I use this to construct the DataFrame
df #<==this prints the table below:
I want to construct a similar table, just with Customer Name and Address with my API-accessed JSON data, but I'm not having any luck with parameters and would love to know how to do it.