Skip to content

Commit

Permalink
Apply along the right axis
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieltseng committed Oct 18, 2023
1 parent 693a692 commit d195808
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion process_labels/loading_funcs/china.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def load_china() -> geopandas.GeoDataFrame:
data=df, geometry=geopandas.points_from_xy(df.lon, df.lat), crs=LATLON_CRS
)
gdf = df.reset_index(drop=True)
gdf[RequiredColumns.IS_CROP] = df.apply(lambda x: 1 if x.crop == "Crop" else 0)
gdf[RequiredColumns.IS_CROP] = df.apply(lambda x: 1 if x.crop == "Crop" else 0, axis=1)
gdf[RequiredColumns.INDEX] = df.index
gdf[RequiredColumns.EXPORT_END_DATE] = df.apply(
lambda x: datetime(x.year, EXPORT_END_MONTH, EXPORT_END_DAY), axis=1
Expand Down

0 comments on commit d195808

Please sign in to comment.