Skip to content

Commit

Permalink
fix(epiweek): fix epiweek value data type (#68)
Browse files Browse the repository at this point in the history
* fix(epiweek): fix epiweek value data type

* fix tests
  • Loading branch information
luabida authored Jun 4, 2024
1 parent fcee57f commit c7cfa18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion satellite/weather/copebr.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def _geocode_to_dataframe(dataset: xr.Dataset, geocode: int, raw=False):
del ds
geocode = [geocode for g in range(len(df))]
df = df.assign(geocodigo=da.from_array(geocode))
df = df.assign(epiweek=Week.fromdate(df.index.to_pydatetime()[0]))
df = df.assign(epiweek=str(Week.fromdate(df.index.to_pydatetime()[0])))
columns_to_round = list(set(df.columns).difference(set(["geocodigo", "epiweek"])))
df[columns_to_round] = df[columns_to_round].map(lambda x: np.round(x, 4))
return df
Expand Down

0 comments on commit c7cfa18

Please sign in to comment.