Professional Documents
Culture Documents
Marvel 2
Marvel 2
NAME : DAKSH
CLASS : 12th
ROLL NO : 26627897
SUBMITTED TO : Mr. SUBHASH SINGH
INDEX
S. No CONTENT SIGN
1. Create a table named prince having columns student id, name,
class, marks, tuition fee.
10. Apply the function upper and lower on the table named prince.
15. Give a series , print all the elements that are above the
75th percentile.
16. Create a panda’s series from a dictionary of values and a ndarray.
18. Create the following DataFrame Sales containing year wise sales
figures for five salespersons in INR. Use the years as column
labels, and salesperson names as row labels.
.
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
import pandas as pd
def fl_scv():
print(pd.Series(44,range(1,11))
)
fl_scv()
output
OUTPUT
import pandas as pd
import numpy as
np def pro3():
#Creating series from a
dictionary
d={'Jan':31,'Feb':28,'Mar':31,'Apr':3
0}
s=pd.Series(d)
print("Series from dictionary")
print("~~~~~~~~~~~~~~~~~~~~~~~")
print(s)
#Creating series from an
ndarray ar=np.array([2,3,4,5,6])
print("\nSeries from ndarray")
print("~~~~~~~~~~~~~~~~~~~~~~~")
s1=pd.Series(ar)
print(s1
) pro3()
OUTPUT
2018 2019 2020 2021