2017-08-01 71 views

回答

6

这就是所谓的boolean indexing,需要[]只:

df[df.Sex=='male'] 

或者:

df.query("Sex =='male'") 
+0

该死的,我就是这样的小白。 –

+1

感谢吨寿。 –