def decap(df, neck, end_func=None):
    """
    Separate the head from the body of a dataframe
    """
    if end_func is None:
        end_func = lambda h, b: len(b) - 1

    head = df.iloc[:neck]
    body = df.iloc[neck:]
    end = end_func(head, body)
    body = body[:end]

    return head, body