Skip to content

Instantly share code, notes, and snippets.

@philMarius
Last active July 31, 2020 10:17
Show Gist options
  • Save philMarius/81530a50797b4dc2227ff3b98c7a826f to your computer and use it in GitHub Desktop.
Save philMarius/81530a50797b4dc2227ff3b98c7a826f to your computer and use it in GitHub Desktop.
Pandas et al. helper functions
# Put x axis on top of graph
# https://stackoverflow.com/questions/14406214/moving-x-axis-to-the-top-of-a-plot-in-matplotlib
_ = ax.xaxis.tick_top()
# Splitting a seaborn barplot by some categorical aspect of data
sns.barplot(data=dataframe, x="x_var", y="y_var", hue="categorical_aspect")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment