I have a boolen series of true and false in a data frame. what i need is how to covert the rest false results to true in case i found only one true. Thank you . For example a coulmn df["Test"]= [false,false,true,false ,true ,false]
I need to get it df["Test"] = [false,false,true,true,true,true]
Bear in mind that the data frame contains a coulmn for data df["Date"]and coulmn for time df["Time"]
I have tried many buy can figure it out Thank you
Use
idxmax
:EDIT
Because OP's original data is
String
, so convert it toBoolean
firstly.