Created
January 20, 2024 14:16
-
-
Save wibowotangara/c6a33985c7996efbfb98dea60a2e27fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
single_value_cols = [col for col in df.columns if df[col].nunique() == 1] | |
df = df.drop(columns=single_value_cols) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment