def read_df_or_series_from_csv(desired_type: Type[pd.DataFrame], file_path: str, encoding: str,<EOL>logger: Logger, **kwargs) -> pd.DataFrame:
if desired_type is pd.Series:<EOL><INDENT>if '<STR_LIT>' not in kwargs.keys():<EOL><INDENT>one_col_df = pd.read_csv(file_path, encoding=encoding, index_col=<NUM_LIT:0>, **kwargs)<EOL><DEDENT>else:<EOL><INDENT>one_col_df = pd.read_csv(file_path, encoding=encoding, **kwargs)<EOL><DEDENT>if one_col_df.shape[<NUM_LIT:1>] == <NUM_LIT:1>:<EOL><INDENT>return one_col_df[one_col_df.columns[<NUM_LIT:0>]]<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return pd.read_csv(file_path, encoding=encoding, **kwargs)<EOL><DEDENT>
Helper method to read a dataframe from a csv file. By default this is well suited for a dataframe with
headers in the first row, for example a parameter dataframe.

:param desired_type:
:param file_path:
:param encoding:
:param logger:
:param kwargs:
:return: