Python Api, shopify.order ( to_dict) load data into Pandas?

Solved
Highlighted
Tourist
12 3 0

Hi,

I found to_dict... how can i use that ? 
lib > site-packages > pyactiveresource > activersource.py  

Rownumber: 744

# Public instance methods
def to_dict(self):





Because i want to load shopify.order in panda dataframe. but i need a dict for it..

orders = shopify.Order.find(page=1)

print(pd.DataFrame.from_dict(orders.to_dict))

Error:AttributeError: 'list' object has no attribute 'to_dict'


I have traid this but didn't help 

print(pd.DataFrame((orders[1].attributes)))

error:ValueError: arrays must all be same length
0 Likes
Highlighted
Tourist
12 3 0

This is an accepted solution.

Nvm found it..

print( pd.DataFrame([orders[1].attributes]))

print( pd.DataFrame([s.attributes for s in orders]))
0 Likes