I have a dataframe which has 377 columns, how do I automate (using a for loop probably) to check the nunique() of the columns and if it is equal to 1 which means the variance = 0, I want to drop that column. Please help me, highly grateful.
I have a dataframe which has 377 columns, how do I automate (using a for loop probably) to check the nunique() of the columns and if it is equal to 1 which means the variance = 0, I want to drop that column. Please help me, highly grateful.