pandas dataframe hist title 1

pandas dataframe hist title

plt.subplot(2,3,1)  # if use subplot
df = pd.read_csv('documents',low_memory=False)
df['column'].hist()
plt.title('your title')

Here is what the above code is Doing:
1. plt.figure() creates a new figure
2. plt.subplot(2,3,1) creates a subplot with 2 rows, 3 columns, and the first subplot
3. df = pd.read_csv(‘documents’,low_memory=False) reads in the csv file
4. df[‘column’].hist() creates a histogram of the column
5. plt.title(‘your title’) adds a title to the histogram

Similar Posts