Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into strausz-working
Browse files Browse the repository at this point in the history
  • Loading branch information
David Strausz committed Dec 6, 2024
2 parents d455e5a + 11812e2 commit 17dff8b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ARGOS_service_data_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ def get_data(fobj=None):
"s4": str,
},
)
#pad hhmm and doy with 0's
df["doy"] = df["doy"].str.zfill(3)
df["hhmm"] = df["hhmm"].str.zfill(4)

df["year_doy_hhmm"] = pd.to_datetime(arg=df.pop("year").str.cat(df.pop("doy")).str.cat(df.pop("hhmm")),
format="%Y%j%H%M")
Expand Down Expand Up @@ -185,6 +188,9 @@ def get_data(fobj=None):
"s8": str,
},
)
#pad hhmm and doy with 0's
df["doy"] = df["doy"].str.zfill(3)
df["hhmm"] = df["hhmm"].str.zfill(4)

df["year_doy_hhmm"] = pd.to_datetime(arg=df.pop("year").str.cat(df.pop("doy")).str.cat(df.pop("hhmm")),
format="%Y%j%H%M")
Expand Down Expand Up @@ -320,6 +326,9 @@ def get_data(fobj=None, time="current"):
on_bad_lines='warn',
dtype=dtype,
)
#pad hhmm and doy with 0's
df["doy"] = df["doy"].str.zfill(3)
df["hhmm"] = df["hhmm"].str.zfill(4)

df["year_doy_hhmm"] = pd.to_datetime(arg=df.pop("year").str.cat(df.pop("doy")).str.cat(df.pop("hhmm")),
format="%Y%j%H%M")
Expand Down

0 comments on commit 17dff8b

Please sign in to comment.