def pick_datatype(counts):
    """
    If the underlying records are ONLY of type `integer`, `number`,
    or `date-time`, then return that datatype.

    If the underlying records are of type `integer` and `number` only,
    return `number`.

    Otherwise return `string`.
    """
    to_return = 'string'
    if counts.get('date-time', 0) > 0:
        return 'date-time'
    if len(counts) == 1:
        if counts.get('integer', 0) > 0:
            to_return = 'integer'
        elif counts.get('number', 0) > 0:
            to_return = 'number'
    elif len(counts) == 2 and counts.get('integer', 0) > 0 and counts.get(
        'number', 0) > 0:
        to_return = 'number'
    return to_return
