I'm trying to perform an operation on a whole column but I'm getting a type error, I want to make a column containing a Shapely Point:
crime_df = crime_df[crime_df['Latitude'].notna()]
crime_df = crime_df[crime_df['Longitude'].notna()]
crime_df['Longitude'] = crime_df['Longitude'].astype(float)
crime_df['Latitude'] = crime_df['Latitude'].astype(float)
print (crime_df['Longitude'])
print (crime_df['Latitude'])
crime_df['point'] = Point(crime_df['Longitude'], crime_df['Latitude'])
Output:
18626 -87.647379
Name: Longitude, Length: 222, dtype: float64
18626 41.781100
Name: Latitude, Length: 222, dtype: float64
TypeError: cannot convert the series to <class 'float'>