I got a data frame with millions of rows and approximately thousand columns. I have a large process in selecting which rows that meets all correct criterias for different columns. Approximately 100 000 rows will be left when the process is over.
I'm currently using following code for each of every column to delete rows not meeting the criteriums but it's very time consuming and take several minutes and I think there must be a more efficient method to do this. I've read some threads but not find anything that relevant.
df = df.drop(df[(df['Column167'] < Column167_min) | (df['Column167'] > Column167_max)].index)
Thankful for suggestions.