In [2]:
enames=["ramesh","kiran","rajesh"]
months=["jan","feb","march"]
In [3]:
enames
Out[3]:
In [5]:
ramesh=[30000,4000,3900]
In [6]:
kiran=[5000,2000,8000]
In [7]:
rajesh=[3000,20000,10000]
In [2]:
import numpy as np
In [11]:
sal=np.array([ramesh,kiran,rajesh])
In [12]:
sal
Out[12]:
In [13]:
print(sal)
In [15]:
Out[15]:
In [17]:
mat1[0,0]
Out[17]:
In [14]:
denames={"ramesh":0,"kiran":1,"rajesh":2}
In [15]:
sal
Out[15]:
In [16]:
sal[0]
Out[16]:
In [18]:
sal[denames['ramesh']]
Out[18]:
In [19]:
dmonths={"jan":0,"feb":1,"march":2}
In [21]:
sal[denames['ramesh'],dmonths['jan']]
Out[21]:
No comments:
Post a Comment