Skip to content

Instantly share code, notes, and snippets.

@GeorgeSeif
Created January 20, 2019 22:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save GeorgeSeif/c86deb9900f356c8f63b48e9dac0c4fb to your computer and use it in GitHub Desktop.
Save GeorgeSeif/c86deb9900f356c8f63b48e9dac0c4fb to your computer and use it in GitHub Desktop.
# Computing correlation coefficients
x_cols = [col for col in data.columns if col not in ['output']]
for col in x_cols:
corr_coeffs = np.corrcoef(data[col].values, data.output.values)
# Get the number of missing values in each column / feature variable
data.isnull().sum()
# Drop a feature variable
data = data.drop('feature_name', 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment