Skip to content

Commit

Permalink
return empty dataframe when not requesting validations set
Browse files Browse the repository at this point in the history
  • Loading branch information
basaks committed Oct 10, 2023
1 parent 9a18a3b commit afbdbcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uncoverml/resampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def resample_by_magnitude(input_data, target_field, bins=10, interval='linear',
validation_df = pd.concat(validation_dfs_to_concat)
return output_gdf, validation_df
else:
return output_gdf
return output_gdf, pd.DataFrame()


def resample_spatially(input_shapefile, target_field, rows=10, cols=10,
Expand Down Expand Up @@ -226,7 +226,7 @@ def resample_spatially(input_shapefile, target_field, rows=10, cols=10,
validation_df = pd.concat(validation_dfs_to_concat)
return output_gdf, validation_df
else:
return output_gdf
return output_gdf, pd.DataFrame()


def create_grouping_polygons_from_geo_df(rows, cols, gdf_out):
Expand Down

0 comments on commit afbdbcc

Please sign in to comment.