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.
На этой странице сайта вы можете посмотреть видео онлайн How to Import CSV Data with Coordinates into Python GeoPandas and Plot it (Beginner Python Tutorial) длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Pro Geomatics 22 Ноябрь 2025, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 138 раз и оно понравилось 8 зрителям. Приятного просмотра!