December 2015
Beginner to intermediate
202 pages
4h
English
Creating a frequency table for a single column is good; creating a frequency table for two is even better. That's what we'll do in this recipe.
As with the previous recipes where we retrieve data from MongoDB, you need to have MongoDB running and to have imported the accidents dataset.
import pandas as pd import numpy as np from pymongo import MongoClient
client = MongoClient('localhost', 27017) db = client.pythonbicookbook collection = db.accidents fields = {'Date':1, 'Police_Force':1, ...Read now
Unlock full access