print("\n--- DEFAULT value check for Sydney ---")
sydney = pd.read_sql("""SELECT City_Name, Country, Is_Capital
FROM City
WHERE City_Name == 'Sydney';""", conn)
print(sydney)
print("Is_Capital was not given — DEFAULT 'No' was used automatically.")
print("\n--- NULL in the Population column ---")
all_cities = pd.read_sql("""SELECT City_Name, Country, Population
FROM City;""", conn)
print(all_cities)
missing = pd.read_sql("""SELECT City_Name FROM City
WHERE Population IS NULL;""", conn)
print("Cities with no population data:")
print(missing)
has_data = pd.read_sql("""SELECT City_Name, Population FROM City
WHERE Population IS NOT NULL;""", conn)
print("Cities with population data:")
print(has_data)
conn.close()
To embed this project on your website, copy the following code and paste it into your website's HTML: