I have my df as following:
In [2]: df Out[2]:
A B C
0 b1 1 0
1 b2 1 0
2 b1 3 1
3 b1 2 1
4 b2 2 1
5 b2 4 1
I want to use a pandas command to just select elements according the column B:
In [2]: df_new Out[2]:
A B C
0 b1 1 0
1 b2 1 0
3 b1 2 1
4 b2 2 1
Cheers, Behzad.