Created
September 6, 2021 01:22
-
-
Save SajidLhessani/6ae7716349c4202aafb9b0883b7b0881 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Change the value of 'Corr' to -1 if it is less than -1 | |
df.loc[df['Corr'] < -1, 'Corr'] = -1 | |
# Change the value of 'Corr' to 1 if it is greater than 1 | |
df.loc[df['Corr'] > 1, 'Corr'] = 1 | |
# Drop the NaN values | |
df = df.dropna() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment