I have a geodataframe gdf that looks like this:
longitude latitude geometry
8628 4.890683 52.372383 POINT (4.89068 52.37238)
8629 4.890500 52.371433 POINT (4.89050 52.37143)
8630 4.889217 52.369469 POINT (4.88922 52.36947)
8631 4.889300 52.369415 POINT (4.88930 52.36942)
8632 4.889100 52.368683 POINT (4.88910 52.36868)
8633 4.889567 52.367416 POINT (4.88957 52.36742)
8634 4.889333 52.367134 POINT (4.88933 52.36713)
I was trying to convert these point geometries into a line. However, the following code below gives an error: AttributeError: 'Point' object has no attribute 'values'
line_gdf = gdf['geometry'].apply(lambda x: LineString(x.values.tolist()))
line_gdf = gpd.GeoDataFrame(line_gdf, geometry='geometry')
Any ideas ?