def extract_OD600(df_DataSeries):
    """
    Extracts the last OD600 measurement for each sample.

    Parameters
    ----------
    df_DataSeries : pandas.DataFrame
        A dataframe that contains the OD600 measurements over time. For each
        sample there is one column for the time points and one column for the
        OD 600 measurements.

    Returns
    -------
    df_OD600 : pandas.DataFrame
        A dataframe that shows the OD600 measurement at the last time point for
        each sample.
    """
    # Select only the columns that contain OD 600 measurements
    col_names = [
        name for name in list(df_DataSeries.columns) if name.endswith("data")
    ]
    df_OD600 = df_DataSeries[col_names]
    # Fill all NaN with the last value and transform
    df_OD600 = df_OD600.ffill(axis=0).T
    # Take only sample name and last OD measurement
    df_OD600.reset_index(inplace=True)
    df_OD600 = df_OD600.iloc[:, [0, -1]]
    df_OD600.columns = ["samplename_OD", "OD600"]
    df_OD600["samplename_OD"] = df_OD600["samplename_OD"].str[:6]
    return df_OD600