def get_string_name_from_df(column_name, row, index, dataframe):
    """
    In case a name in a row has the form of a datetime, it is automatically converted to a
    datestring, which is not what we want.

    Parameters
    ----------
    column_name: str
        Name of the column to extract
    row: Series
        Row from the dataframe from iterows
    dataframe: DataFrame
        Full DataFrma from the dataframe from iterows

    Returns
    -------
    str:
        Name obtained from the column

    """
    col_str = row[column_name]
    if not isinstance(col_str, str):
        # in case a name has the form of a date/time, it is automatically converted by
        # iterows. Convert to original
        col_str = dataframe.loc[index, column_name]

    return col_str