import math


def round_sample(input_dataframe, frac=0.1, min_samples=1):
    """Sample X ensuring at least min samples are selected."""
    num_samples = max(min_samples, math.floor(len(input_dataframe) * frac))
    return input_dataframe.sample(num_samples)