def fs_to_string(fs: float) -> str:
    """
    Convert sampling frequency into a string for filenames

    Parameters
    ----------
    fs : float
        The sampling frequency

    Returns
    -------
    str
        Sample frequency converted to string for the purposes of a filename

    Examples
    --------
    >>> from resistics.common import fs_to_string
    >>> fs_to_string(512.0)
    '512_000000'
    """
    return (f"{fs:.6f}").replace(".", "_")