access column pandas 1

access column pandas

Report_Card.loc[:,"Grades"]
The first argument ( : ) signifies which rows we would like to index, 
and the second argument (Grades) lets us index the column we want

Here is what the above code is Doing:
1. We are selecting the column named Grades from the DataFrame named Report_Card
2. We are then assigning the column to a variable named Grades
3. We are then printing the variable Grades

Similar Posts