In [1]:
from __future__ import division
import pymongo, pandas, random
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from scipy import stats

%matplotlib inline

client = pymongo.MongoClient('localhost', 27017)

results_db = client['results']['question_5']


In [2]:
cursor = results_db.find({'women_pvalue': {'$lt': 0.05}}, 
                         {u'_id': False, u'community':True, 'women_coef':True, 
                          'women_pvalue':True, 'category': True})

df =  pandas.DataFrame(list(cursor))

In [3]:
df


Out[3]:
category community women_coef women_pvalue
0 life-arts academia 0.008566 1.272568e-02
1 technology blender -0.018400 2.859708e-02
2 culture-recreation chinese -0.015996 2.043257e-02
3 technology crypto 0.017700 6.554042e-03
4 culture-recreation english 0.005404 9.185493e-03
5 science mathoverflow 0.003639 1.739808e-02
6 business patents -0.027652 1.233601e-02
7 culture-recreation poker -0.014931 4.428805e-02
8 technology stackoverflow 0.005204 2.601357e-09
9 technology superuser 0.001668 1.065237e-02
10 technology webmasters 0.005380 3.618571e-02
11 technology wordpress 0.003244 4.190521e-02

In [ ]: