I'm relatively new to Python / Pandas and struggling with extracting the correct data from pd.Dataframe. In fact, I have a Dataframe with 3 columns:
data = Position Letter Value 1 a TRUE 2 f FALSE 3 c TRUE 4 d TRUE 5 k FALSE
What I want to do is put all the TRUE rows in a new Dataframe so that the answer is as follows:
answer = Position Letter Value 1 a TRUE 3 c TRUE 4 d TRUE
I know that you can access a specific column using
data['Value']
but how can I extract all TRUE strings?
Thanks for any help and advice,
Alex
source share