0% found this document useful (0 votes)
10 views

pandas assignment

Uploaded by

aryanrawat935878
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

pandas assignment

Uploaded by

aryanrawat935878
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Pandas 1

1. What is Series? Write the python code to create a Series of five elements.
2. What do you understand by Accessing elements of Series? Define indexing and slicing
with example.
3. Define the following attributes and also give examples according to the following series.
● Name ● Size
● Index.name ● Empty
● Values
seriesAlph
a 10
b 50
c 500
d 500
e 500
f 15
dtype: int32

4. Explain with example head (), tail () and count () with example.
5. Define DataFrame in python.
6. Write the code to create three Series and then create DataFrame by these three Series.
7. Write a program to create a DataFrame of 4x4(row n column) by dictionary.
8. Write the code to add a new row in DataFrame (created in Q. 7).
9. Write the code to add a new column in DataFrame (created in Q. 7).
10. Write the code to delete first row from DataFrame (created in Q. 7).
11. Write the code to change the columns names in DataFrame (created in Q. 7).
12. Write the code to create the following DataFrame (NAME – MARKS).

13. What do you understand by Indexing and Slicing? Write the code to display only Name column and Rows
from 1 to 3 from above DataFrame.
14. Write the code to join two DataFrames from Q. 7 and Q. 12. Write the output also after joining these two
DataFrame.
15. Explain the following Attributes and also write the syntax for attributes for applying DataFrame Marks(Q.
No. 12).
a. Index f. Size
b. Columns g. Transpose
c. Dtypes h. Head
d. Values i. Tail
e. Shape j. Empty
16. Write the code for Importing and Exporting CSV file to DataFrame.

You might also like