Skip to content

Commit

Permalink
Update ARGOS_service_data_converter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunwbell committed Dec 5, 2024
1 parent bb21e89 commit 11812e2
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 11812e2

Please sign in to comment.