def fill_missing_values(eem_df, fill):
    """Fills NA/NAN values within an excitation-emission matrix with a user-selectable value.

    Args:
        eem_df (pandas.DataFrame): An excitation-emission matrix.
        fill (str): The value to replace NA/NAN values with.

    Raises:
        ValueError: Raised if fill passed value other than "zeros" or "interp".

    Returns:
        pandas.DataFrame: An excitation-emission matrix with missing values filled in.
    """
    valid_fill = {"zeros", "interp"}
    if fill not in valid_fill:
        raise ValueError("fill_missing_values: fill must be one of %r." % valid_fill)
    if fill == "zeros":
        eem_df.fillna(0, inplace=True)
    elif fill == "interp":
        eem_df = eem_df.interpolate(method="linear", axis=0).ffill().bfill()
    return eem_df