Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std= newdf.std(numeric_only=True)
- zero_variance_numerical_variables = []
- for index, value in std.items():
- if(value == 0):
- # print(index)
- zero_variance_numerical_variables.append(index)
- for i in zero_variance_numerical_variables:
- df = newdf.drop(i, axis=1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement