WHY
WHERE
HOW
WHEN
WHO
FOR WHAT
Defining Data Science
• What Does a Data Science Professional Do?
• Data Science in Business
• Use Cases for Data Science
1. Introduction Of Python In Data Science
Python As A Data Science Tool
Python is an open-source high-level programming language catered to general-purpose
programming. It is instrumental for both IT-related projects as well as the analytical ones. Let’s
study python language in detail.
History
Python was conceived in the year 1980 by Guido Rossum at Centrum Wiskunde and
Informatica (CWI) institute as a worthy successor to the ABC language. ABC language was
itself a powerful language during the 90s, capable of handling and interfacing with the Amoeba
operating system. Python was initially executed in December 1989.
Guido Rossum, the guy brain behind Python Programming Language
Python is a multi-paradigm programming language. It supports both, object-oriented
programming as well as structured programming. Many of its operations support functional and
aspect-oriented programming.
Rather than having all of its functionalities constructed into its core, Python was designed to be
highly extensible. For starters, Van Rossum's created Python with the vision of building a small
startup language coupled with a large library of packages and easily extensible interpreter.
2. Python Versions
Python 2.0 was released in 2000 with many major changes, including a garbage collector and
support for Unicode.
The next version, 3.0 was published in 2008. It was a major update of the language that was not
completely backward-compatible during its application. Many of its major features were reverse-
ported to Python 2.6 and 2.7 version series.
Currently, Python 3.7.1 is the latest stable platform which everyone from freshers to
experienced professionals is using.
Features
Flexible/Portable
Python is an open-source language. Naturally, it has been ported to many platforms. All python
programs will work on any of these platforms without requiring to make any major or minor
changes in the code.
Python can be used on Linux, Windows, Macintosh, PlayStation and can also be operated on
PocketPCs!
Freely available and open source
Python is free of cost and is available for distribution in the open. One can make duplicates of
this software, hack the software's source code and make changes to it. This is one of the
reasons why Python is so clean and consistent, it has been guarded and looked after by a
community who just want to see a better and improved version of python daily!
Support
Due to its vast online community, python is marketed as the best programming language till
date. Its constant support and regular updates for users and administrators make it dependable
and easy to use over other languages.
Easy to master
Compared to Java or any other languages, it is easy to learn and grasp python at the beginners
level. For those who want to build applications and deploy them on the cloud, python is the
preferred language.
Dynamic
Python is a strong-dynamically typed language. Dynamically typed means the variables are
taken care and won’t conflict with each other.
Semantics/Syntax
Indentation
Python utilizes whitespace indentation and not curly brackets or keywords to limit the code
blocks. An increase in indentation will only occur after certain statements; a decrease in
indentation indicates the end of the existing code block.
The program's visual structure represents the semantic structure of the code. This feature is
also sometimes called as the off-side rule.
3. Statements and control flow
We work with control flow and statements all the time for input for sort of algorithm. Let’s see the
common ones.
If statement- It executes a block of code based on a condition, along with else and else-if
For statement- It creates an iteration over an iterable object, storing each element to a local
variable for use by the predefined block.
While statement- It performs the block of code as long as the predetermined condition is true.
Try catch statement- It allows the exceptions to be raised in its code block to be caught and
handled by except clauses.
Raise statement- It is used to raise a particular exception or raise it again to a catch an
exception.
Expressions
Addition, subtraction, multiplication, and division operations can be easily performed in python.
The division is a bit different compared to others. It has two types. They are floor division and
integer division.
Python uses the ** operator for exponentiation function.
From Python 3.5, the new ‘@’ operator was introduced. It is called infix. It is intended to be used
by the libraries like NumPy for matrix multiplication in machine learning.
Python also incorporates the words and, or, not for its boolean operators rather than the
symbols- &&, ||, ! which are used in Java and C.
We don't require to declare integers after importing the libraries in python. Specifying the integer
and its datatype is mandatory in C and Java.
Method
Methods are like functions attached to the object's class. The syntax is quite simple and is
dignified by instance.method(argument) for normal methods and functions. Python has an inbuilt
engine to access instance data, compared to the implicit self (or this) in some other object-
oriented programming languages.
Typing
Python allows avid coders to define their own typing techniques and methods using classes,
often instrumental for object-oriented programming. Different instances of classes can be
created by calling the class, for instance, the SpamClass().
As python uses duck typing, it consists of both, typed objects and untyped variable names.
4. Libraries
Tons of libraries are available for surplus functionality, to say the least. Pythons biggest strength
lies in its toolkits and libraries. It includes libraries for creating graphical user interfaces(GUI),
establishing a connection to relational databases, generating pseudo-random numbers,
performing arithmetic operations with arbitrary precision decimals, changing regular
expressions, plus unit testing.
Implementation
There are some neat implementations in python.
CPython is the primary implementation of Python. It is written in C, having the C89 standard and
a few C99 features. It compiles all the python programs to an intermediate bytecode which is
later executed by its virtual machine. Windows and most modern Unix-like systems support this
implementation.
After going through the tiring process of understanding and decoding python, we can take a
break from the technical stuff and focus on the good part! These are some of the factors why
python is way ahead of its competition.