You cannot use both n and frac simultaneously. If both are specified, pandas will raise a ValueError.