I have a dataframe from a CSV file that has 61 columns and 1mil rows. 25 of those columns
(Flag_1, Flag_2, ..., Flag_25)
as values for each row of the dataframe.
What I'm trying to do is loop through each column to determine if there is a True for that entire row within those columns, I just need a minimum of one true. If there is a True then a new column,
will have a True value for that row, if not, then False.
I can use the for loop for a single column like so,
for index, x in data2['FLAG_1'].iteritems() :
data2['FLAG_ALL'] = data2['FLAG_1'] == True
but can't figure out for multiple columns.