diff --git a/bin/index_archival.py b/bin/index_archival.py index 59a3c7b3..5063c6b5 100644 --- a/bin/index_archival.py +++ b/bin/index_archival.py @@ -91,12 +91,12 @@ def main(): # Restrict the input DataFrame to the subset of wanted columns. if 'upper' in args.index_table: df = data.select( - F.col('objectId').cast('string'), - F.col('prv_candidates.jd').cast('array'), - F.col('prv_candidates.fid').cast('array'), - F.col('prv_candidates.magpsf').cast('array'), - F.col('prv_candidates.sigmapsf').cast('array'), - F.col('prv_candidates.diffmaglim').cast('array') + F.col('objectId').cast('string').alias('objectId'), + F.col('prv_candidates.jd').cast('array').alias('jd'), + F.col('prv_candidates.fid').cast('array').alias('fid'), + F.col('prv_candidates.magpsf').cast('array').alias('magpsf'), + F.col('prv_candidates.sigmapsf').cast('array').alias('sigmapsf'), + F.col('prv_candidates.diffmaglim').cast('array').alias('diffmaglim') ) else: df = df_flat