6 """Loads file and do some fixes to fit it to our standard and make it able to be processed
9 filename (str): s3 full path of filename
10 features (dict): contains delimiter, skip_rows and encoding required for current file
11 session (boto3 obj): AWS client connection
12 rel_col (str): column name used to identify upc/release_id
13 Returns: df (pandas dataframe)
15 delimiter = features[
"delimiter"]
16 skip_rows = features[
"skip_rows"]
17 encoding = features[
"encoding"]
18 df = wr.s3.read_csv(filename, sep=delimiter, skiprows=skip_rows, encoding=encoding, dtype={rel_col:str}, keep_default_na=
False, low_memory=
False, boto3_session=session)
20 df.drop(df.index[-1], inplace=
True)