Show the subplot of the diamond carat weight distribution. For data science using Python in Anaconda - Jupyter
#import the library Pandas
import pandas as pd
#Put the diamond.csv dataset on Root Directory
#Read the dataset
data1 = pd.read_csv('diamond.csv')
#Show the subplot of the diamond carat weight distribution.
plt.figure(figsize=[12,12])
plt.subplot(221)
plt.hist(data1['carat'],bins=20,color='lightseagreen')
plt.xlabel('Carat Weight')
plt.ylabel('Frequency')
plt.title('Distribution of Diamond Carat Weight')
plt.title('Distribution of Diamond Carat Weight')
Output:-