Skip to content

Commit

Permalink
Fix mypy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dostuffthatmatters committed Aug 2, 2024
1 parent ef378fb commit 18d1db8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/export/dataframes.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def post_process_dataframe(
# apply savgol_filter on the data columns
df = df.select(
pl.col("utc"),
pl.exclude("utc").map(
pl.exclude("utc").map_batches(
lambda x: scipy.signal.savgol_filter(x.to_numpy(), 31, 3).tolist()
).list.explode(),
)
Expand All @@ -231,7 +231,7 @@ def post_process_dataframe(
pl.exclude(["small_gap"]).interpolate()
).otherwise(pl.exclude(["small_gap"]))
).select(pl.exclude("small_gap")
).sort("utc").groupby_dynamic("utc", every=sampling_rate).agg(
).sort("utc").group_by_dynamic("utc", every=sampling_rate).agg(
pl.exclude("utc").mean()
)
)
Expand All @@ -243,7 +243,7 @@ def merge_dataframes(dfs: list[pl.DataFrame], ) -> pl.DataFrame:
"""Merges the dataframes into a single dataframe by
joining them on the "utc" column."""

merged_df = pl.concat(dfs, how="diagonal").groupby("utc").mean()
merged_df = pl.concat(dfs, how="diagonal").group_by("utc").mean()
data_column_names = merged_df.columns
data_column_names.remove("utc")
df_without_null_rows = merged_df.filter(
Expand Down

0 comments on commit 18d1db8

Please sign in to comment.