Skip to content

Instantly share code, notes, and snippets.

View AmanKrishna's full-sized avatar

Aman Krishna AmanKrishna

  • India
View GitHub Profile
@AmanKrishna
AmanKrishna / titanic_eda_functions.py
Last active November 16, 2022 14:58
Functions Used
# Function to print digits on top of Barplot
def show_values(axs, orient="v", space=.01):
def _single(ax):
if orient == "v":
for p in ax.patches:
_x = p.get_x() + p.get_width() / 2
_y = p.get_y() + p.get_height() + (p.get_height()*0.01)
value = '{:.2f}'.format(p.get_height())
ax.text(_x, _y, value, ha="center")
elif orient == "h":