1. 学习
  2. /
  3. 课程
  4. /
  5. Visualizing Geospatial Data in Python

Connected

练习

Extracting longitude and latitude

A DataFrame named df has been pre-loaded for you. Complete the code to extract longitude and latitude to new, separate columns.

说明

100 XP
  • Print the first few rows with print() and df.head().
  • Use a list comprehension to extract latitude to a new column called lat.
  • Use a list comprehension to extract longitude to a new column called lng.
  • Print the first few rows with print() and df.head() again to confirm the new columns.