Sat down with 307,511 bank loan records, Pandas and NumPy as the only real tools, trying to figure out what actually separates someone who defaults from someone who doesn't. Turns out that's a much messier question than it sounds.
First thing was just cleaning up the mess. Checked null percentages column by column, some were fine, some were basically unusable. Removed the columns that weren't contributing anything meaningful, no point carrying dead weight through the whole analysis.
Spent a while just looking, distributions of individual columns, correlations against the target variable, trying to get a feel for the data before jumping to conclusions. Plotted defaulters versus non-defaulters across categorical columns, and a few patterns showed up faster than expected, others took longer to trust.
Handled nulls properly instead of just dropping them, replaced with central tendency measures based on NOIR classification, because mean, median, and mode aren't interchangeable depending on what kind of data you're actually looking at. Standardized everything, binned numerical columns to see how default rates shifted across ranges, and used boxplots to catch outliers that would've quietly skewed everything downstream.
By the end, plotted the final cleaned features against the target variable, and the story was clearer than when I started. Nothing that would shock a risk analyst, but something that could genuinely help one refine how they think about risk, which was really the point all along.
