Selecting individual rows

To select a specific row within the Pandas dataframe derived from the CARTO account dataset, a conditional statement can be passed to the object in brackets. Here, the NBA arenas dataset's team column is queried by passing the name of an NBA team as a parameter:

df[df.team=='Toronto Raptors']

Get Mastering Geospatial Analysis with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.