Python for Analytical Skills
UNIT I: Introduction to Python:
- Python versus Java
Java is a statically typed and compiled language, and Python is a dynamically typed and interpreted language. This single difference makes Java faster at runtime and easier to debug, but Python is easier to use and easier to read. (Ref: https://www.bmc.com/blogs/python-vs-java/)
- Python Interpreter and it’s Environment
Translator (Converting High level language such as english to computer readable form because computer can understand binary(0 or1) language only)
a) Compiler : IT reads all program then convert whole code into machine level language. ( Example : C programming, C++, Core Java)
b) Interpreter :
Its reads line by line and convert line by line into machine level language. (Example : Python3) : it helps to run the program.
c) Assembler : (covert Assembly level language to machine level language )
Python installation
https://www.python.org/downloads/release/python-3101/
Step to run python program in command prompt:
Open Notebook
Write python code in notebook file
Save File with .py extension in any folder ( Example : program1.py)
Open Command Propmpt
Locate folder where python file is saved( for example : cd C:\Users\rkmis\OneDrive\Desktop\Python-File
run the code using below command
python program1.py
- Python basics:
variables
operators
Strings,
Conditional and
Control Statements,
loops;
- Data structures: lists and dictionaries;
- functions: global functions,
- local functions,
- lambda functions and methods.
UNIT II: Object Oriented Programming Concepts:
Class,
object,
constructor, destructor and inheritance;
Modules & Packages,
File Input and Output,
Catching exceptions to deal with bad data,
Multithreading, Database Connectivity. 8
UNIT III: Numpy:
Creating Arrays, Arrays Operations, Multidimensional Arrays.
Arrays transformation, Array Concatenation, Array Math Operations, Multidimensional Array and its Operations, Vector and Matrix.
Visualization: Visualization with matplotlib, Figures and subplots, Labeling and arranging figures, Outputting graphics.
UNIT IV: Pandas:
Manipulating data from CSV,
Excel, HDF5, and SQL databases,
Data analysis and modelling with Pandas,
Time-series analysis with Pandas, Using Pandas, the Python data analysis library, Series and Data Frames,
Grouping, aggregating and applying, Merging and joining.
References:
1. McKinney Wes, "Python for Data Analysis: Data Wrangling with Pandas, NumPy, and IPython", O'Reilly Media, 2012.
2. Hauck Trent, "Instant Data Intensive Apps with Pandas How-To", Packt Publishing Ltd, 2013.
3. Beazley David M.,"Advanced Python Programming", Pearson Education,2009.
4. Chun Wesley , Core Python Programming, 3rd Edition,Prentice Hall Professional, 2012.
5. Telles Matt "Python Power!: The Comprehensive Guide", Cengage Learning, 2008.
6. McKinney Wes & PyData Development Team, "pandas: powerful Python data analysis toolkit", Release 0.13.1, Feb 2014.
7. https://docs.python.org/3.4/tutorial/
8. http://www.tutorialspoint.com/python/python_quick_guide.htm
Outcomes: -
Learning core data types of python.
Learning conditional and looping operations in python. -
Able to work with Object-oriented concepts and Database connectivity in python.
Able to analyze data using Pandas and Numpy.
Able to visualize the data using seaborn and matplotlib.