This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import csv | |
import dateutil.parser | |
import pymongo | |
import sys | |
if len(sys.argv) != 2: | |
print("usage: %s csvfile" % sys.argv[0]) | |
sys.exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 0; i < 100000; i++) { | |
match = {"$match": | |
{ | |
"OffenseTeam": "DEN", | |
"$or": [{"PlayType": "PASS"}, {"PlayType": "RUSH"}], | |
"IsNoPlay": 0 | |
} | |
} | |
sample = {"$sample": | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mongoimport --type=csv --headerline -d nfl -c pbp_2015 pbp-2015.csv | |
2016-01-26T21:40:44.549-0500 Failed: fields cannot be identical: '' and '' | |
2016-01-26T21:40:44.549-0500 imported 0 documents |
NewerOlder