Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
68.6k views
in Information Technology by (45.7k points)
closed by

Consider the following DataFrame, classframe

Rollno Name Class Section CGPA Stream
St1 1 Aman IX E 8.7 Science
St2 2 Preeti X F 8.9 Arts
St3 3 Kartikey IX D 9.2 Science
St4 4 Lakshay X A 9.4 Commerce

Write commands to : 

i. Add a new column ‘Activity’ to the Dataframe 

ii. Add a new row with values ( 5 , Mridula ,X, F, 9.8, Science)

1 Answer

+1 vote
by (45.0k points)
selected by
 
Best answer

i. classframe[‘Activity’]=[‘Swimming’,’Dancing ’,’Cricket’, ‘Singing’]

ii. classframe.loc[‘St5’]=[1,’Mridula’, ‘X’, ‘F’, 9.8, ‘Science’]

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...