import numpy as np
a=np.arange(36)
a=np.reshape(a,[6,6])
a
import pandas as pd
v=["farin","shakti","sthitha","mousami","zen","appstone"]
b=[1,2,3,4,5,6]
df=pd.DataFrame(a,index=v,columns=b)
df
df.sum(axis=1)
df.iloc[0:3]
df["average"]=df.sum(axis=1)/6
df
df[df>4]
df[df==22]
x=[]
for i in range(7):
n=int(input("enter a no"))
x.append(n)
x
x=[]
y=[]
for i in range(6):
f=input("Enter a name")
g=input("Enter his marks")
x.append(f)
y.append(g)
Enter a namejbsdj
Enter his marks45
Enter a name45
Enter his marks56
Enter a namefdsf
Enter his marks67
Enter a namedsfdg
Enter his marks76
Enter a namedf
Enter his marks67
Enter a namedfg
Enter his marks454
x
['jbsdj', '45', 'fdsf', 'dsfdg', 'df', 'dfg']
y
['45', '56', '67', '76', '67', '454']
a=np.arange(36)
import numpy as np
import pandas as pd
a
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35])
a=np.reshape(a,[6,6])
a
array([[ 0, 1, 2, 3, 4, 5],
[ 6, 7, 8, 9, 10, 11],
[12, 13, 14, 15, 16, 17],
[18, 19, 20, 21, 22, 23],
[24, 25, 26, 27, 28, 29],
[30, 31, 32, 33, 34, 35]])
df=pd.DataFrame(a,index=x,columns=y)
df
import jovian
jovian.commit()
[jovian] Saving notebook..