0% found this document useful (0 votes)
22 views3 pages

Some Practice Question

Uploaded by

tapasdad7777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views3 pages

Some Practice Question

Uploaded by

tapasdad7777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Some practice question

Q2.

Q3Write statements employee is name of dataframe


a)Write a statement to display Name and Salary columns from the above DataFrame.

Ans-

b) Write a statement to display all the information from Employee ids ‘E102’ to ‘E104’ (Both
are included)

ans

or

Or

c) Write a statement to display the employee’s name, designation and salary for those having
employee ids as ‘E101′ and ‘E103’.

d) Write a statement to display the Salary of Darpan.

Ans-

Question : Given a DataFrame namely “data”. Write the code for the following commands

a) Find all rows with the label “Pencil”. Extract all columns
Ans-

b) List products with count more than 25.

Ans-

c)Display 2nd , 3rd and 4th row.

Ans-

d)Display only the columns Company and Price.

e)Display only rows with labels ‘Pencil’ and ‘Pen’

f) Delete column price from the above dataframe employee.

Ans-del employee[“price”]

g)D elete the record with employee pen and eraser.

Ans-employee=employee.drop([“pen”,”eraser”])

You might also like