How do I create a list of categories and display the entries relating to each of these categories that have at least one entry?
Here's the link to relevant the "Get Help" article:

How do I list the entries related to a category?

These really helpful tutorials are somewhat hidden on builtwithcraft.com, I overlooked them more than once while thought the normal Documentation articles!

Just use the provided example code in your category loop:

{% set entryIds = craft.entries.section('partners').ids() %}
{% set categories = craft.categories.relatedTo({ sourceElement: entryIds }).groupId(2).find() %}

{% for category in categories %}
    &lt;div&gt;
        &lt;h3&gt;{{ category.title }}&lt;/h3&gt;
        &lt;ul&gt;     

            {# Fetch all of the entries related to this category #}
            {% set entries = craft.entries.relatedTo(category) %}

            {# Output them #}
            {% for entry in entries %}
                &lt;li&gt;{{ entry.title }}&lt;/li&gt;
            {% endfor %}

        &lt;/ul&gt;
    &lt;/div&gt;
{% endfor %}﻿