0% found this document useful (0 votes)
112 views29 pages

Module Wise Ktu Notes

The document provides an overview of various Python libraries, including OS, NumPy, and Matplotlib, detailing their functions and capabilities. It covers file handling, array manipulation, mathematical operations, and plotting techniques. Examples of code snippets illustrate how to use these libraries for practical applications in data analysis and visualization.

Uploaded by

savagemaaman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
112 views29 pages

Module Wise Ktu Notes

The document provides an overview of various Python libraries, including OS, NumPy, and Matplotlib, detailing their functions and capabilities. It covers file handling, array manipulation, mathematical operations, and plotting techniques. Examples of code snippets illustrate how to use these libraries for practical applications in data analysis and visualization.

Uploaded by

savagemaaman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 29
Dwys visAky, AP, Ce ES —™ te rv the Os & Sys Medula — O Os module » povid function fr vintorotting ide operating Sm: / ce weduls fralps unto inlerack: will Uae files shy cuedele - OS dr yp uly soll bstdlih Python 3 c=0s getardc) ul al | nb he pent Co) Errmed- vl ake. . d b get dhe new Avec 4 ao os midi @ e041) the will aeals 4 Mw 1 Acecly name> New! 4) To Rename one dwéeliry wilk, Archer os: Yename (" a Cow", “neg 2") ol New 5) To temove ot deveeling oS. amar} (new 2") E) To dik ou He cb redirtn dC os Natl Cpa os. bafeif) a Ho hate taref dvedly Can speety Bom cuowcenp tha aAveelr . drvecbey | we ned ) To gle tae name of 6 For osay 08 name C) @) TH roy Whuth ore Legged on tuename os. gh lopn O en of the Wed a) To check she path. enn bi os path encla Cpnt) 9A porte To youn me 4 mre P DD) a a poh gour (phy x paths) > ull be new pat gels ya deme —_ OQ ") 0s. a alin Jee gee um a drediy be “ wt Aree cithan. Upsae- down ( &9- down) 4 bth. Fey each deveeling 7 wk yald, 3 pans i) a fam at uk Awéckrrees Wwe speegeeh | Lit) avg + Prink our «ub- duvedlzun Gon ve E au) Al - pron ook al fil, Prem rook 2 Awerta ins | + | | impelt as | nh = OS: getusd Y) | fa root ais, file va O° walk (path, ‘apdloune ru) print Cott) print (ai os) int Chil 1D ee i) fork C) > Jelly Ba compat -b copy ererylniey about dhe carentty sunny tee wk mmewly created prgrem tee ea . ee et Vv pr con number Porenk L Onde prom ve are wm 0S. gekuid ) > yelinn Uke pocen! une vel os: gk gid () + relitmn prectm oup id os gk pid) 3 Clrrenk prc id 6s “4 ppd O 5 Ceerrenh parent fon ‘d Sys _rvedalan Ly pile ini es aod wel teak au wud © auarsipelole ap pou oa pftien sani ome Ts opt this coved 0 cain _ Jp fom the Corman (yt Awe potomd-ot 2) imaged OP “ie _ i ee fan t 1 OP CaM ) preak a, ae G) Sided - *® uplay He 7 i Topol 4° sys edo wile (Helle!) @ Sen — whomever av erocephin pecwm Vn yothn ) ‘ob vals b sys Sd ery ® G ev pom sys exitlo) = Facconspull Te pmmicaes @ Sys-path 5 telmn toe Lit of Arechinny Tm pak sys print Coys: pe) a Ning fibro - hibray qa el Compan mn Pylhrw - df pevide wile range of farclisis§ enc ale \a wok wk cnr and rae i “a eject Pony Cuon iopak onurnp 4 on Mb ret2 3.3) 9 5" aid =p or} » (ved ad eapeermycevanl 4070 ae eel Dyredain ge vrasin ville ° abet, aver) oncalerncdion evra , ry ms add + ad Sum of! ay aid -a-44 > iff af 1-? Br asda atd 9 Pod of [- 0. a pra . a concak a pprconealonate (Gd a-4d) glace 2 a-SAL2 6] +e glica, He ple * ae asd Cael ex (s,!)) % me le ae cals Bowe 2) colucn LE mosinw mal hplacolion wak ped = mp. pawn le ad, a2 b Mabie “ fads, x AAO inverre_ wok Jinv = =" slnabg. inv (Co 2) <> Male nveme NumPy is a powerful library in Python for numerical computing. It provides a wide range of inbuilt functions to perform various operations on arrays and matrices efficiently. Here are some commonly used inbuilt functions in NumPy: Array Creation Functions: ° mp.array(): Create a NumPy array from a Python list or tuple. * np.zeros(): Create an array filled with zeros, * mp.ones(): Create an array filled with ones, ® np.empty(): Create an uninitialized array, * np.arange(): Create an array with a range of values, * np.linspace(): Create an array with evenly spaced values, 'y Manipulation Functions: np-reshape(): Reshape an array to a specified shape. np.concatenate(): Concatenate arrays along a specified axis. np.split(: Split an array into multiple sub-arrays, np.transpose(): Transpose an array. © np.flatten(): Flatten an array to a 1-D array. Mathematical Functions: © np.sum(: Compute the sum of array elements, ® np.mean(): Compute the mean of array clements. ®p-min(), np.max(): Find the minimum and maximum values in an array. np.sqrt(): Compute the square root of each element. np.exp(): Compute the exponential of each element. np.sin(), np.cos(), np.tan(): Compute trigonometric functions. * _np.dot(): Perform dot product of two arrays, Array Statistics Functions: ® np.std(): Compute the standard deviation of array elements. * np.var(): Compute the variance of array elements, * np.median(): Compute the median of array elements. Random Number Generation Functions: © np.random.rand(): Generate random numbers from a uniform distribution, ¢ np.random.randn(): Generate random numbers from a standard normal distribution, * hp.random.randint(): Generate random integers within a specified range. File Input and Output Functions: np.save(): Save an array to a binary file, © np.load(): Load an array from a binary file, Am a Cary Mad Plot dang ‘- Ly plan Mirae i Cwaling p bb ; vig co d album “Type of Plt - ~ a ae \ ve \ af fhe Side Line oe Chak het cher 1Y on > Conor Mat pir bib t pot e _ as valli () dex

You might also like