Let me save you from the most common GeoPandas headache. You have a CSV file with latitude and longitude but nothing shows up when you try to map it. In this tutorial, I show you the easiest way to read CSV coordinates into GeoPandas and convert them into real points on a map.
What you will learn:
• Read CSV with pandas
• Convert lat and lon to geometry
• Create a GeoDataFrame
• Set the correct CRS (EPSG 4326)
• Plot your points
This works for any Python GIS workflow.
Code used in this tutorial:
import pandas as pd
import geopandas as gpd
from shapely.geometry import Point
df = pd.read_csv('data.csv')
geometry = [Point(xy) for xy in zip(df.longitude, df.latitude)]
gdf = gpd.GeoDataFrame(df, geometry=geometry)
gdf.set_crs(epsg=4326, inplace=True)
gdf.plot()
If this helped you, check out my video on importing Shapefiles, GeoPackages and GeoJSON into GeoPandas.
En esta página del sitio puede ver el video en línea How to Import CSV Data with Coordinates into Python GeoPandas and Plot it (Beginner Python Tutorial) de Duración hora minuto segunda en buena calidad , que subió el usuario Pro Geomatics 22 noviembre 2025, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 138 veces y le gustó 8 a los espectadores. Disfruta viendo!