code: def single_row_or_col_df_to_dict(desired_type: Type[T], single_rowcol_df: pd.DataFrame, logger: Logger, **kwargs)\
          -> Dict[str, str]:
      
      if single_rowcol_df.shape[0] == 1:
          return single_rowcol_df.transpose()[0].to_dict()
          # return {col_name: single_rowcol_df[col_name][single_rowcol_df.index.values[0]] for col_name in single_rowcol_df.columns}
      elif single_rowcol_df.shape[1] == 2 and isinstance(single_rowcol_df.index, pd.RangeIndex):
          # two columns but the index contains nothing but the row number : we can use the first column
          d = single_rowcol_df.set_index(single_rowcol_df.columns[0])
          return d[d.columns[0]].to_dict()
      elif single_rowcol_df.shape[1] == 1:
          # one column and one index
          d = single_rowcol_df
          return d[d.columns[0]].to_dict()
      else:
          raise ValueError('Unable to convert provided dataframe to a parameters dictionary : '
                           'expected exactly 1 row or 1 column, found : ' + str(single_rowcol_df.shape) + '')
docs: Helper method to convert a dataframe with one row or one or two columns into a dictionary
  
      :param desired_type:
      :param single_rowcol_df:
      :param logger:
      :param kwargs:
      :return: