Advertisement
makaubenson

Untitled

Dec 5th, 2022
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. std= newdf.std(numeric_only=True)
  2. zero_variance_numerical_variables = []
  3. for index, value in std.items():
  4.     if(value == 0):
  5.         # print(index)
  6.         zero_variance_numerical_variables.append(index)
  7.  
  8. for i in zero_variance_numerical_variables:
  9.     df = newdf.drop(i, axis=1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement