Skip to content

Instantly share code, notes, and snippets.

@douglaspsteen
Created August 16, 2020 02:36
Show Gist options
  • Save douglaspsteen/2ca2f904f086daa85c620a1747a40247 to your computer and use it in GitHub Desktop.
Save douglaspsteen/2ca2f904f086daa85c620a1747a40247 to your computer and use it in GitHub Desktop.
# Fill null values with each column mean
df = df.fillna(df.mean())
# Define X and y
X = df.drop('y', axis=1)
y = df.y
# Visualize class distribution
y.value_counts().plot(kind='bar')
plt.xticks([0,1], ['No Seizure', 'Seizure'])
plt.ylabel('Count');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment