LearnPy Hub
← Pandas: DataFrames problems
Medium

loc and iloc

Print the name in the first row with iloc, the dept of the last row with iloc, and the cgpa of the row with index label 0 with loc.

Input

Lines 'name dept cgpa credits', then END.

Output

Three lines.

Sample 1

Input
Mim CSE 3.82 120
Rafi EEE 3.41 98
Sara CSE 3.95 132
Tuhin BBA 3.60 110
Nadia CSE 3.71 125
END
Output
Mim
CSE
3.82

Sample 2

Input
A CSE 3.00 100
END
Output
A
CSE
3.0
solution.py
Output appears here
loc and iloc · Python practice problem · LearnPy Hub