December 2015
Beginner to intermediate
202 pages
4h
English
A frequency table is another way of summarizing data; it shows the number of times a value occurs. In this recipe, we will create a frequency table of casualties by date.
To use this recipe, you need to have MongoDB running, and to have the accidents data imported.
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