Skip to content

Instantly share code, notes, and snippets.

@netsatsawat
Last active May 18, 2019 16:23
Show Gist options
  • Save netsatsawat/70251c6dce9bf4d9307536458c0def9e to your computer and use it in GitHub Desktop.
Save netsatsawat/70251c6dce9bf4d9307536458c0def9e to your computer and use it in GitHub Desktop.
Read in data and sample check
import pandas as pd
data_df = pd.read_csv('../data/WA_Fn-UseC_-HR-Employee-Attrition.csv')
print(data_df.shape)
display(data_df.describe())
print(data_df.isnull().sum())
one_uniq = dict()
for col in data_df.columns:
if len(data_df[col].unique()) == 1:
one_uniq.update({col: data_df[col].unique().tolist()})
data_df.drop(one_uniq.keys(), axis=1, inplace=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment