Skip to content

Commit

Permalink
Address FutureWarning in Sycamore
Browse files Browse the repository at this point in the history
  • Loading branch information
hackdna committed Oct 28, 2024
1 parent 8ef5ada commit 0f38540
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions forest/sycamore/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,7 @@ def aggregate_surveys_config(
config_surveys[["config_id", "question_id"]], how="left",
left_on="question id", right_on="question_id"
).drop(["question_id"], axis=1)
df_merged["config_id_update"] = df_merged["config_id"].fillna(
method="ffill"
)
df_merged["config_id_update"] = df_merged["config_id"].ffill()
df_merged["config_id"] = df_merged.apply(
lambda row:
row["config_id_update"] if row["event"] in ["User hit submit",
Expand Down
2 changes: 1 addition & 1 deletion forest/sycamore/submits.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def summarize_submits(submits_df: pd.DataFrame,
if timeunit == Frequency.DAILY:
submits["delivery_time_floor"] = submits["delivery_time"].dt.floor("D")
elif timeunit == Frequency.HOURLY:
submits["delivery_time_floor"] = submits["delivery_time"].dt.floor("H")
submits["delivery_time_floor"] = submits["delivery_time"].dt.floor("h")
if timeunit is not None:
# round to the nearest desired unit
submits["year"] = submits["delivery_time_floor"].dt.year
Expand Down

0 comments on commit 0f38540

Please sign in to comment.