Skip to content

Instantly share code, notes, and snippets.

@oneryalcin
Created September 23, 2019 23:10
Show Gist options
  • Save oneryalcin/d3508692ca29dda29e02146fd08ff2d6 to your computer and use it in GitHub Desktop.
Save oneryalcin/d3508692ca29dda29e02146fd08ff2d6 to your computer and use it in GitHub Desktop.
10 Sparkify Skew fix
f, axes = plt.subplots(2, 3, figsize=(14, 7), sharex=False)
sns.distplot( joined_pandas["sessionCount"] , color="skyblue", ax=axes[0, 0])
sns.distplot( joined_pandas["meanSongCount"] , color="olive", ax=axes[0, 1])
sns.distplot( joined_pandas["sessionsFreqDay"] , color="gold", ax=axes[0, 2])
# Skew handling
sns.distplot( np.log(joined_pandas["sessionCount"]) , color="skyblue", ax=axes[1, 0])
sns.distplot( np.sqrt(joined_pandas["meanSongCount"]) , color="olive", ax=axes[1, 1])
sns.distplot( np.sqrt(joined_pandas["sessionsFreqDay"]) , color="gold", ax=axes[1, 2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment