Member-only story
Introduction to Python for Data Science — Part 3
Important Python Libraries in Data Science
This is Part 3 and the more exciting part of this series. Here you will learn more about the main Python libraries used in Data Science. If you haven’t read Part 1 and Part 2 I strongly recommend you to go back and study them carefully.
What are libraries and why do we need them?
As discussed in Part 1 of this series of articles, the Python programming language was created to be simple, and modules can be added for additional functionality according to user needs. Like real book libraries, these external modules when added to the code base can increase the Python abilities (like a real book that increases your knowledge when you read it). A library contains a set of functions previously written by researchers and programmers that can be used in our projects without the user needing to write code to perform all the steps in the function.
Let’s take an example, imagine you want to find the value for the sin of 2. You can use Bhaskara I’s sine approximation formula, but you still need to write the full function yourself:
def sin_x (x):
x= ((16*x)*(3.1415926535-x))
/((5*(3.1415926535**2))-(4*x*(3.1415926535-x)))
print(x)