To run this example you need to install pymongo.
pip install pymongo
In [1]:
import pymongo
import pandas as pd
In [2]:
client = pymongo.MongoClient('localhost', 27017)
db = client['adults-db']
collection = db['income']
In [3]:
income_df = pd.DataFrame(list(collection.find()))
In [4]:
client.close()
In [6]:
income_df.head()
Out[6]:
In [7]:
income_df.tail()
Out[7]:
In [8]:
income_df['age'].describe()
Out[8]:
In [9]:
income_df['education'].describe()
Out[9]:
In [ ]: