def df_to_experiment_annotator_table(df, experiment_col, annotator_col, class_col):
    """

    :param df: A Dataframe we wish to transform with that contains the response of an annotator to an experiment
            |    |   document_id | annotator_id   |   annotation |
            |---:|--------------:|:---------------|-------------:|
            |  0 |             1 | A              |            1 |
            |  1 |             1 | B              |            1 |
            |  2 |             1 | D              |            1 |
            |  4 |             2 | A              |            2 |
            |  5 |             2 | B              |            2 |

    :param experiment_col: The column name that contains the experiment (unit)
    :param annotator_col: The column name that identifies an annotator
    :param class_col: The column name that identifies the annotators response (class)
    :return: A dataframe indexed by annotators, with experiments as columns and the responses in the cells
            | annotator_id   |   1 |   2 |   3 |   4 |   5 |   6 |   7 |   8 |   9 |   10 |   11 |   12 |
            |:---------------|----:|----:|----:|----:|----:|----:|----:|----:|----:|-----:|-----:|-----:|
            | A              |   1 |   2 |   3 |   3 |   2 |   1 |   4 |   1 |   2 |  nan |  nan |  nan |
            | B              |   1 |   2 |   3 |   3 |   2 |   2 |   4 |   1 |   2 |    5 |  nan |    3 |
            | C              | nan |   3 |   3 |   3 |   2 |   3 |   4 |   2 |   2 |    5 |    1 |  nan |
            | D              |   1 |   2 |   3 |   3 |   2 |   4 |   4 |   1 |   2 |    5 |    1 |  nan |

    """
    return df.pivot_table(
        index=annotator_col, columns=experiment_col, values=class_col, aggfunc="first"
    )