How to create a bar chart from two columns in a Pandas DataFrame?
import pandas as pd
import matplotlib.pyplot as plt
df = pd.DataFrame({"X": ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'], "Y": [50, 73, 68, 47, 60, 65]})
The DataFrame looks as follows:

df.plot(x = "X", y = "Y", kind = "bar")
plt.show()
The plot looks as follows:

You can remove the legend from the above as follows.
#exclude legend
df.plot(x = "X", y = "Y", kind = "bar", legend = False)
plt.show()

Here’s the code in github: