def _reformat_spectrometer_df(spectrometer_df_with_clean_header):
    """ Reformats a df of spectrometer data with many wavelength columns to a more useful format with 2 columns

    Args:
        spectrometer_df_with_clean_header: a pandas df of spectrometer data,
            cleaned up with _clean_up_spectrometer_df_header()

    Return:
        A pandas df, indexed by timestamp, with 2 columns: wavelength and intensity
    """

    n_timestamp_columns = 1
    wavelength_columns = spectrometer_df_with_clean_header.columns[n_timestamp_columns:]
    # Melt function is a pivot and turns 3648 columns, each one wavelength, into one column
    reformatted_spectrometer_df = spectrometer_df_with_clean_header.melt(
        id_vars=["timestamp"],
        value_vars=wavelength_columns,
        var_name="wavelength",
        value_name="intensity",
    )
    reformatted_spectrometer_df["wavelength"] = reformatted_spectrometer_df[
        "wavelength"
    ].astype(float)

    return reformatted_spectrometer_df.set_index(["timestamp"])