If the right table has the same college_id many times, one registration can turn into many rows. Your total count will grow and your chart may look impressive but wrong.
Before merging, check whether the key should be unique. If it should be unique, remove or fix duplicates first.
You can ask ChatGPT, Gemini, or Claude to suggest the join key and join type. Paste column names and two sample rows, not private student data.
Check the answer yourself. Ask: Which table is the main table? Can the key repeat? What rows would be lost with an inner join?
Example
Chart the result
Quick charts are checks, not final dashboard work. Use them to catch odd joins, missing matches, and strange category counts.
Pandas plotting uses Matplotlib. For missing data, bar plots fill missing values with 0, while scatter plots and histograms drop missing values. Use fillna or dropna first if that is not what you want.
import matplotlib.pyplot as plt
# Count registrations by city after the join
city_counts = (
merged["city"]
.fillna("Unknown")
.value_counts()
.head(10)
)
city_counts.plot(kind="bar", title="Top cities by registrations")
plt.xlabel("City")
plt.ylabel("Registrations")
plt.tight_layout()
plt.savefig("output/top_cities.png")
plt.close()
# Check fee vs attendance only where both are present
plot_data = merged.dropna(subset=["fee_rupees", "attendance_percent"])
plot_data.plot(
kind="scatter",
x="fee_rupees",
y="attendance_percent",
title="Fee vs attendance"
)
plt.tight_layout()
plt.savefig("output/fee_vs_attendance.png")
plt.close()
Your to-do
Do this now
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.