def rnd(float, places=None):
    """Round a float to decimal places.

    float : float
        Value to round.
    places : int, default=None
        Number of decimal places to round to. None defaults to 1 decimal place if float < 100, otherwise defaults to 0 places.
    """
    if places is None:
        if float < 1:
            places = 2
        elif float < 100:
            places = 1
        else:
            places = 0
    rounded = round(float, places)
    if rounded != int(rounded):
        return rounded
    else:
        return int(rounded)
