Okay, I am probably pursuing a roundabout way of accomplishing this, but I had a list called "goodAttributes
" and a dataframe called QTable
. If a column name of QTable
is in "goodAttributes
" than I want to return the max of that column, otherwise I want to return the minimum of the column...
I checked if the column name of QTable
was in the list "goodAttributes
" using "grepl
" and then reset the column names of QTable
if the value was in the list "goodAttributes
" as "True" and otherwise set the column name as "False
", and called the new table QTable2
.
Current DataFrame called "QTableB":
Now, if the column name of QTableB
is "True
" I want to find the maximum of that column, and if the column name of QTableB
is "False
" I want to return the minimum of that column... storing the results in a new data frame.