File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -138,13 +138,15 @@ def load_default_labels(
138
138
) -> geopandas .GeoDataFrame :
139
139
labels = geopandas .read_file (DATAFOLDER_PATH / LABELS_FILENAME )
140
140
export_end_year = pd .to_datetime (labels [RequiredColumns .EXPORT_END_DATE ]).dt .year
141
- labels ["end_date" ] = export_end_year .apply (lambda x : date (x , 12 , 12 ))
141
+ labels ["end_date" ] = export_end_year .apply (
142
+ lambda x : date (x , EXPORT_END_MONTH , EXPORT_END_DAY )
143
+ )
142
144
labels = labels .assign (
143
145
start_date = lambda x : x ["end_date" ]
144
146
- timedelta (days = DAYS_PER_TIMESTEP * DEFAULT_NUM_TIMESTEPS )
145
147
)
146
- labels = labels .assign (
147
- export_identifier = lambda x : f"{ x ['index' ]} -{ x [RequiredColumns .DATASET ]} "
148
+ labels [ "export_identifier" ] = labels .apply (
149
+ lambda x : f"{ x ['index' ]} -{ x [RequiredColumns .DATASET ]} " , axis = 1
148
150
)
149
151
if dataset :
150
152
labels = labels [labels .dataset == dataset ]
You can’t perform that action at this time.
0 commit comments