Jovian
⭐️
Sign In
In [ ]:
import numpy as np

In [ ]:
a=np.arange(36)
In [ ]:
a=np.reshape(a,[6,6])
In [ ]:
a

In [ ]:
import pandas as pd
In [ ]:
v=["farin","shakti","sthitha","mousami","zen","appstone"]
b=[1,2,3,4,5,6]
df=pd.DataFrame(a,index=v,columns=b)

In [ ]:
df
In [ ]:
df.sum(axis=1)
In [ ]:
df.iloc[0:3]
In [ ]:
df["average"]=df.sum(axis=1)/6
In [ ]:
df
In [ ]:
df[df>4]
In [ ]:
df[df==22]
In [ ]:
x=[]
for i in range(7):
    n=int(input("enter a no"))
    x.append(n)
    
    
In [ ]:
x
In [2]:
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
In [3]:
x
Out[3]:
['jbsdj', '45', 'fdsf', 'dsfdg', 'df', 'dfg']
In [4]:
y
Out[4]:
['45', '56', '67', '76', '67', '454']
In [7]:
a=np.arange(36)
In [6]:
import numpy as np
import pandas as pd
In [8]:
a
Out[8]:
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])
In [9]:
a=np.reshape(a,[6,6])
In [10]:
a
Out[10]:
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]])
In [11]:
df=pd.DataFrame(a,index=x,columns=y)
In [12]:
df
Out[12]:
In [13]:
import jovian
In [ ]:
jovian.commit()
[jovian] Saving notebook..
In [ ]: