What are Libraries
- Libraries are packages of codes that are developed by others which allow users to easily perform actions.
- If we have to write the codes on our own, it will take us so much time to do it, plus, we will have to understand the mechanism of actions all the way from inside out.
- You should always try to find and import the right libraries, it will save you tons of time.
- Say you are stuck on writing the codes or find it time consuming, you shall look for libraries on the internet. Someone might have written something similar before and you might want to import their libraries.
- Here is link to the Standard Library from Python
Python Libraries for Machine Learning, Deep Learning, Artificial Intelligent
- numpy & scipy : scientific calculation
- pandas : data handling / import
- matplotlib : creating graph
- scikit learn (sklearn) : statistic and data science
- theano : Deep Learning & Artificial Intelligent
- tensorflow :Deep Learning & Artificial Intelligent
- keras : Combination of theano and tensorflow
Before the library is imported to the Python, we need to install them first.
1.) In Anaconda Python (Spyder), Go to Tools > Open a Terminal
2.) In the BOTTOM RIGHT pane, find the tab “Python Console” and you should see “Terminal” is opened
3.) Enter “pip list” in the terminal , and you should see a list of libraries you have installed
4.) Install the library
For example :
pip install numpy
pip install scipy
pip install matplotlib
pip install scikit-learn
pip install theano
pip install tensorflow
pip install keras
How to Import Libraries in Python
Type in Editor Section
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
Select them and hit Ctrl + Enter
When the library is imported, you should see the codes executed in iPython Console on the BOTTOM RIGHT pane.
How to Update all lib
if you are using Anaconda, then you can use the following.
conda update –all
it will then ask users
Hit Y and enter to continue.
Other Sections on Data Handling in Python
1.) How to Import Libraries