I am building a credit risk model. I run into problem visualizing the data in a histogram
I tried this code:
# List of numerical columns for histogram visualization
numerical_columns = ['case_id', 'collater_valueofguarantee_1124L', 'collater_valueofguarantee_876L',
'num_group1', 'num_group2', 'pmts_month_158T', 'pmts_month_706T',
'pmts_year_1139T', 'pmts_year_507T']
# Plot histograms for each numerical column
for column in numerical_columns:
plt.hist(df[column].dropna(), bins=20) # Drop null values before plotting
plt.xlabel(column)
plt.ylabel('Frequency')
plt.title(f'Histogram of {column}')
plt.show()
And I end up with the following histograms like the attached. I can’t read meaning this
Any suggestions on how i can improve my histogram is very much welcome.
Cheers