Python For Data Science
Python For Data Science
• For example: Python’s Pandas Library offers a variety of functions for data
wrangling (data cleaning) and manipulation.
• Plotting libraries like matplotlib and seaborn can be used for data
visualisation.
• Finally, Python has several machine learning libraries like sci-kit learn which
1
1
About Python
• Python is a high-level language. (Computers understand the language of binary
digits- 0s (false) and 1s (true) which is called machine language or low-level
language. However, it is difficult for humans to write or comprehend instructions
using 0s or 1s. In this context, high-level languages such as Python, C++, Java
can be used to write programmes in a language that is easily understood by
humans. Language Translators like Compilers and Interpreters can then be used
to translate a programme written in a high-level language (called a source code)
to machine language.
• Python was created by Guido Van Rossum in the late 1980s when he was
working at CWI (Centrum Wiskunde & Informatica) which is a National
Research Institute for Mathematics and Computer Science in Netherlands. The
language was released in 1991.
• Python got its name from a BBC comedy series from seventies- “Monty Python’s
Flying Circus”. (available on Netflix)
2
2
Advantages of Python
• It is a free and open source language (A software is called open source if it is
publicly accessible – anyone can see, modify and distribute the code of an
Open Source Software).
• It provides a good system of libraries which are robust and varied. There is a
large user community that is engaged in developing new libraries and improving
existing libraries.
3
3
Advantages of Python
• Python offers an ability to integrate with big data platforms like Hadoop, Spark
etc.
• Python can be used to follow both Procedural approach and Object Oriented
approach of programming. (Procedural programming is about writing
procedures or functions that perform operations on the data, while object-
oriented programming (OOP) is about creating objects that contain both
data and functions. The OOP feature helps in reducing the repetition of
code. It allows to extract out the codes that are common for the application,
and place them at a single place and reuse them instead of repeating it.)
• Python provides support for reading files from local memory, databases and
cloud storage.
4
4
Why should Students and Professionals learn
Python?
5
5
Why should Students and Professionals learn
Python?
While earlier R was more popular, Python has emerged as the programming platform of choice in the last few years. Python’s
syntax is more readable as compared to R, there is thus a large user community that keeps contributing to the development of
Python Libraries.
6
6
Limitations of Python
• Python is not the fastest language. It is an interpreted language not a fully
compiled one. (Python uses an interpreter to convert its instructions into machine
language so that it can be understood by the computer. An interpreter processes
the programme statements one by one, first translating and then executing. This
process is continued until an error is encountered or the whole program is
executed successfully. In both the cases, program execution will stop. On the
contrary, a compiler translates the entire source code, as a whole, into the object
code. After scanning the whole programme, it generates error messages, if any.
• While Python is often praised for being a general-purpose language with an easy-
to-understand syntax, this feature makes it difficult to translate a Python Code
into another language which has a well-defined structure.
7
7