course content

Course Content

Advanced Techniques in pandas

Output Columns by TitleOutput Columns by Title

You are already familiar with the functions that can output the dataset, but imagine you want to output only a specific column. Firstly, let's get acquainted with the dataset for this section. By the way, it is inconvenient to output the whole data set, so data analysts usually output a part of it to examine. In this course, we will usually output the first 5 rows.

0Top Gun: MaverickJosephKosinskiTomCruise, JenniferConnelly, MilesTeller, ValK...8.6Action,Drama130minUA2022
1Everything Everywhere All at OnceDanKwan,, MichelleYeoh, StephanieHsu, KeHuyQuan, James...8.3Action,Adventure,Comedy139minR2022
2The BatmanDanKwan,RobertPattinson, Zo√ęKravitz, JeffreyWright, Co...7.9Action,Crime,Drama176minUA2022
3Jurassic ParkMattReevesSamNeill, LauraDern, JeffGoldblum, RichardAtte...8.2Action,Adventure,Sci-Fi127minUA1993
4The GodfatherStevenSpielbergMarlonBrando, AlPacino, JamesCaan, DianeKeaton9.2Crime,Drama175minA1972

This table will help you understand how to output specific columns:

Function's PurposeSyntaxOutput
data['Director']Extract one column by titleAll values from column 'Director'
data[['Title', 'Stars']]Extract several columns by titleAll values from column 'Title' and relevant values from the column 'Stars'


We want to output 'Category' and 'IMDb-Rating' columns; choose the correct way to do so.

Select the correct answer

Section 1.

Chapter 1