When applying the user defined function `nearest()` to the GeoDataFrame `df1` you get the below error: ```python AttributeError: 'Series' object has no attribute 'get_values' ``` This is caused by this line in the function: ```python value = df2[nearest][src_column].get_values()[0] ``` And that's because `pandas.DataFrame.get_values()` was deprecated in Pandas since version 0.25.0 (I'm using Pandas v1.0.4 and Geopandas v0.7.0). The below code works: ```python value = df2[nearest][src_column].values[0] ```
When applying the user defined function
nearest()to the GeoDataFramedf1you get the below error:This is caused by this line in the function:
And that's because
pandas.DataFrame.get_values()was deprecated in Pandas since version 0.25.0 (I'm using Pandas v1.0.4 and Geopandas v0.7.0).The below code works: