day 1# - Modules and pip in Python!

*MODULE-                                                                     

Module is like a code library ,basically modules are used to borrow someone else's code

which means you can use someone else's code in your Program with the help of Modules.

The main module is the source file that runs first




Benefit of Modules-

if your are use module it'll save your time and efforts and you and you can work on some big Project.



*There are Two Types-

1.Built in modules-
                            these modules are ready to import and used and ships with the python interpreter there is no need to install such modules explicitly 

(" There are a lot of built-in modules in Python. Some of the important ones are - Collection
datetime, logging, math, OS, pip, sys, and time.")

  built-in functions



2. External modules-
                         these modules are imported from a third party file or can be installed using a package manager like pip. 
Since this code is written by someone else , we can install different version of same modules with times.

"Any or all modules , not derived form the software so that this modules and software run in separate address space, with one calling the other when they are run"



*list of most popular python external modules 

1. machine learning & A.I
2. web development 
3. data analysis and manipulation
4. network and API
5. data visualization
6. testing 
7. database

*THE PIP COMMAND-

it can be used as a package manager pip to install a python modules. lets install a modules called Pandas using the following


USING A MADULE IN PYTHON (USAGE)

we can the important syntax to import a modules in python .

here is an example code:

  import pandas

 #read and work with file name 'word.csv' 

 df=pandas.read_csv('word.csv')

 print(df)

 # this will display first few rows from the word.csv file


Similarly we can install other modules and look into their documentations for usage instructions.
We will find ourselves doing this often in the later part of this course


Note down whatever was told to you today in Chapter 1 and keep practicing. 

All the best to all the Future Programmer.

Thank you

 





Comments

Post a Comment

Popular posts from this blog

day #6 - Exercise 1: make two Calculator using in python

day #5 - Operators in python