Professional Documents
Culture Documents
mehod cou cleay the ente ist but the lish coiti be availo
Ihis
X. cleax ()
Piat (x)
f'aongo', Pogja',
X. append (inana)
Paint (x
item at the specitied index
setan
Insert methad - To in
X l'yinonca','hyd','Pgdn'J
Xoextend (y)
Paint ()
Chiance', 'hyt,'Pgdm','b
foa loop using i'st
list
Cceate a vatioble coith 3elements by osing
x- 'choco', 'bikki','ve'
j6 yin x:
Pst in t Cy)
choco
bilck?
veg item.
to point the inder numbe using
Bample pageam
Method is Pndex
X ['ehoco' Scocet,' veg'
=
x. fodex ('veg')
Pstnt Cx)
object of type set may be Created by enclosing elemerts .
Set bet oithin loops ot 1
Notc: The elements c a set & ace seyuiaed to be îmmutable
Objects.
Set concept doesnot Soppt Podexing, sihg, add moltiplta"
operata.
.
Sels ae OnGdexed go that the user Cannot be Sse n coh
the elements ae auailable in the outpot.
a-'sita', Ram'
0. clean()
PsintCa)
Set ()
&={' sita','Ram
a.discaxd (' Rons ucky')
Pstint (a)
$'sta', 'Rarm'?
ONIT3
Vsual'
wm yalion
V&ualieat t is a a dionersional gaphftal objecB
including
etc.
Ine, ciscle ,Teclange methods thal
pxovides seve xal
Iython bsax y mat plokp speciie
dacilitate dawing the otjects to be móe
barchast etc.
This libxabr9 Soppit hislogiam
How to ostatl matplolib
PiP instatl matplotib
ctol+ eoter
paint 3,a
& Example progzam on v>sualization to Matplctli
keycooid called
Note : Pox uigual2at
cue have to assigu a
have to
X= (a, 3, 5,7,4)
Y= (,4,6, 8,10)
plt-Plot (%, y, 'a- maskeb Size -10-5,linecoiath : 5)
PlE. title ('s-B', Jowtsize =30, coloi 'qoeen')
PIt. showc)
Paint (ar )
5)
Exomple proq3am to point &dimensional array
impost mpy as np
sPace spoce
impost numpy as np
(io,5)
as np. asay(50). reshape
Pint CaY)
(5,6,7,8,
Colu mns
To dind out the rowS &colo we can O5e the Shape
cws Columns of
tonchiou so that it psovides the s00s a
dtype: object
Example Paogam to ceate index vaes to Ses'es
fopot andas as pd
S RA.Sesies ([iol,'icbm'), frdex- ('olege. coce', olege . ram
Paint (s)
College.code
name icbm
college
dtype : objet
rome.
ELomple pogYam to to coeatea data
Sid Soame
lo Smith
loa king
assigo lbops ? to getthe
Th this concept coe have to 7
means
data yra me
loops ade dicion ay Concept ans cusly boac keBs
Tmpot pandas as Pd
k=Pa- Datafame({'sid': o,l02J, 'sname: ['snith,'king'13)
Paint (k)
Sid Soame
(ol Smith
l02 King
adesday H-3
fPr
Thovsday H
PPr
H-5
Friday H-$
satuYday
e
Poirt (df)
ollowing output cath 4sS
Example pongiam to paint the
Zoluns
C-Name high lo
88
85
9ipro 64
place kyd
st method
Impost pandas as Pd
/Desktoplgm.csv')
gm= Rd- zcad _csv('e' :usevs/91113/onc Doive
psirt (qrs)
and methocd
impót pandas as Pd
qm=Pdsend -Csv ('gcsv)
Psivt (typegm))
<Class'Pandas. oe. fame. Datasame
tiampe poiar to gel tolal number o 9o6 ccurns o
hta set.
osco
keyoofd
coiu pHovicde the no-of ows Cokuni
Note: Shap
Jow data set.
Pxtat(qm. Shape
at
(lo6 7, 6) z Columns
County- gm-gm['eoontoy
Rint (County-gm. head( )
Pbint (oonty-g, total County column coil ome
Exaonple pxogBam b extact the coumns, Coonty, Continert
Potink(gn-lc (4})
extact multkple vocas rom dataset.
Exape protam to
Pint(m io [[o,a4,n])