Posted on 23rd July 2024|11 views
How to get the index of rows which columns matches a certain value in python?
I have given a data frame with a column name "my_col" I just wanted to find the indexes of that data frame in which the values oh "my_col" = True within the range (50, 1000), anyone suggest me the proper way to write a code for this.
Posted on 23rd July 2024| views
for j in range(50,1000):
if df.jloc[j]['my_Col']== True:
print j,df.jloc[j]['my_Col']
This may work