2 Data frames

Since long before the invention of computers, people have used tables to present data. That’s because tables make it easy to enter, display, understand, and analyze data. Each row in a table represents a single record or data point, and every column describes an attribute associated with each point. For example, consider table 2.1 of country names, sizes (in square kilometers), and populations, with data taken from Wikipedia toward the end of 2022.

Table 2.1 Country data

Country

Area (sq km)

Population

United States

9,833,520

331,893,745

United Kingdom

93,628

67,326,569

Canada

9,984,670

38,654,738

France

248,573

67,897,000

Germany

357,022

84,079,811

If it seems obvious ...

Get Pandas Workout 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.