Pandas is similar to SQL in many ways in the sense that it is used for data selection, data filtering, data aggregation, data generation, and data modification. SQL does to the database tables what pandas does to the DataFrames. In this section, we will compare the features in SQL with their equivalents in pandas.
Comparison with SQL
SELECT
SELECT is used to select or subset data in certain columns of the tables. Suppose you have a table/DataFrame called DallasData. This data would be attached in your book packet or could be accessed from the cloud drive of the book. To select five rows from the three given columns, you write the following