From f96294fde15b7e80f5719fe4b8a59b6fe9be5b0e Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 14 Jul 2022 22:56:17 +0200 Subject: [PATCH] Fix formatting issues --- src/stactools/goes_glm/parquet.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/stactools/goes_glm/parquet.py b/src/stactools/goes_glm/parquet.py index 5fd76d6..d304361 100644 --- a/src/stactools/goes_glm/parquet.py +++ b/src/stactools/goes_glm/parquet.py @@ -105,12 +105,11 @@ def create_asset( for val in data: delta = timedelta(seconds=val) new_data.append(base + delta) - + table_data[new_col] = new_data - table_cols.append({ - "name": new_col, - "type": "datetime" # todo: correct data type? - }) + table_cols.append( + {"name": new_col, "type": "datetime"} # todo: correct data type? + ) table_data[col] = data table_cols.append(table_col) @@ -123,8 +122,10 @@ def create_asset( # Replace later with somethine like: # dataframe.to_parquet(file, version = "2.6") import geopandas as gp + table = gp.io.arrow._geopandas_to_arrow(dataframe) import pyarrow.parquet as pq + pq.write_table(table, file, version="2.6") # Create asset dict