Reputation: 57
I have a csv file that has something like:
col_a, col_b,isactive
a,b,true
c,d,false
I am trying to write all the rows that have true to one file and the ones that are false to one file. I am trying to understand how i can check for the "false" boolean flag in the dataframe.
# this works
df1 = pd.read_csv(all_users)
df_isActive=(df1[df1['isActive']])
df_isActive.to_csv('onlyactive.csv')
# this doesn't work below.
df_isNotActive=(df1[df1['isActive' == 'False']])
I am trying to figure out how to use "Not" inActive in a dataframe.
Thanks,
Upvotes: 0
Views: 565