In [1]:
import pandas as pd 
import pymongo as pm

In [10]:
db=pm.MongoClient().local

In [12]:
db.test.insert_one({"example":1})


Out[12]:
<pymongo.results.InsertOneResult at 0x1139e9090>

In [13]:
x = {'ask': {0: '186.38'}, 'bid': {0: '186.23'}, 'price': {0: '186.24000000'}, 'size': {0: '11.57557266'}, 'time': {0: '2017-07-29T03:17:25.689000Z'}, 'trade_id': {0: 8491232}, 'volume': {0: '133470.13494318'}}

In [14]:
x


Out[14]:
{'ask': {0: '186.38'},
 'bid': {0: '186.23'},
 'price': {0: '186.24000000'},
 'size': {0: '11.57557266'},
 'time': {0: '2017-07-29T03:17:25.689000Z'},
 'trade_id': {0: 8491232},
 'volume': {0: '133470.13494318'}}

In [19]:
for k,v in x.items():
    print(k,v[0])


ask 186.38
bid 186.23
price 186.24000000
size 11.57557266
time 2017-07-29T03:17:25.689000Z
trade_id 8491232
volume 133470.13494318

In [ ]: