def PlotBarChart(CategoricalVar, data, XName): sns.countplot(CategoricalVar, data=data) plt.xlabel(XName) plt.title( XName + ' Bar Chart') plt.show()