mirror of
https://github.com/PlaneQuery/OpenAirframes.git
synced 2026-07-25 19:20:50 +02:00
deal with whole schema
This commit is contained in:
@@ -101,13 +101,10 @@ def download_and_merge_base_release(compressed_df: pl.DataFrame) -> tuple[pl.Dat
|
|||||||
|
|
||||||
if base_path and os.path.exists(str(base_path)):
|
if base_path and os.path.exists(str(base_path)):
|
||||||
print(f"Loading base release from {base_path}")
|
print(f"Loading base release from {base_path}")
|
||||||
base_df = pl.read_csv(base_path)
|
|
||||||
print(f"Base release has {len(base_df)} records")
|
|
||||||
|
|
||||||
# Parse time column as datetime
|
# Read CSV with schema matching the new data
|
||||||
base_df = base_df.with_columns(
|
base_df = pl.read_csv(base_path, schema=compressed_df.schema)
|
||||||
pl.col('time').str.to_datetime(time_unit='ms', time_zone='UTC')
|
print(f"Base release has {len(base_df)} records")
|
||||||
)
|
|
||||||
|
|
||||||
# Extract earliest date from base release
|
# Extract earliest date from base release
|
||||||
earliest_timestamp = base_df['time'].min()
|
earliest_timestamp = base_df['time'].min()
|
||||||
|
|||||||
Reference in New Issue
Block a user