From f586e0ad81adc754a1cd444b6936290a3213a662 Mon Sep 17 00:00:00 2001 From: Matt Garber Date: Tue, 13 Feb 2024 09:01:26 -0500 Subject: [PATCH] PR feedback --- cumulus_library/study_parser.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cumulus_library/study_parser.py b/cumulus_library/study_parser.py index bdf4c47b..2672d379 100644 --- a/cumulus_library/study_parser.py +++ b/cumulus_library/study_parser.py @@ -689,8 +689,7 @@ def export_study( schema_name, f"{self.get_study_prefix()}__" ) result = db.cursor().execute(table_query).fetchall() - for row in result: - table_list.append(row[0]) + table_list = [row[0] for row in result] else: table_list = self.get_export_table_list() queries = [] @@ -707,8 +706,7 @@ def export_study( dataframe.to_csv( f"{path}/{table}.csv", index=False, quoting=csv.QUOTE_MINIMAL ) - if not archive: - dataframe.to_parquet(f"{path}/{table}.parquet", index=False) + dataframe.to_parquet(f"{path}/{table}.parquet", index=False) queries.append(queries) if archive: file_list = [file for file in path.glob("**/*") if file.is_file()]