Python Advanced
Python Advanced
Introduction to Python
• What is Python?
• WHY PYTHON?
• History
• Features – Dynamic, Interpreted, Object oriented, Embeddable, Extensible, Large standard
libraries, Free and Open source
• Why Python is General Language?
• Limitations of Python
• What is PSF?
• Python implementations
• Python applications
• Python versions
• PYTHON IN REALTIME INDUSTRY
• Difference between Python 2.x and 3.x
• Difference between Python 3.7 and 3.8
• Software Development Architectures
Python Software’s
• Python Distributions
• Download &Python Installation Process in Windows, Unix, Linux and Mac
• Online Python IDLE
• Python Real-time IDEs like Spyder, Jupyter Note Book, PyCharm, Rodeo, Visual Studio Code,
ATOM, PyDevetc
• Interactive Mode
• Scripting Mode
• Programming Elements
• Structure of Python program
• First Python Application
• Comments in Python
• Python file extensions
• Setting Path in Windows
• Edit and Run python program without IDE
• Edit and Run python program using IDEs
• INSIDE PYTHON
• Programmers View of Interpreter
• Inside INTERPRETER
• What is Byte Code in PYTHON?
• Python Debugger
Python Variables
Operators
• Arithmetic Operators
• Comparison Operators
• Python Assignment Operators
• Logical Operators
• Bitwise Operators
• Shift operators
• Membership Operators
• Identity Operators
• Ternary Operator
• Operator precedence
• Difference between “is” vs “==”
• Print
• Input
• Command-line arguments
Control Statements
• Introduction
• Importance of Data structures
• Applications of Data structures
• Types of Collections
• Sequence
• Strings, List, Tuple, range
• Non sequence
• Set, Frozen set, Dictionary
• Strings
• What is string
• Representation of Strings
• Processing elements using indexing
• Processing elements using Iterators
• Manipulation of String using Indexing and Slicing
• String operators
• Methods of String object
• String Formatting
• String functions
• String Immutability
• Case studies
List Collection
• What is List
• Need of List collection
• Different ways of creating List
• List comprehension
• List indices
• Processing elements of List through Indexing and Slicing
• List object methods
• List is Mutable
• Mutable and Immutable elements of List
• Nested Lists
• List_of_lists
• Hardcopy, shallowCopy and DeepCopy
• zip() in Python
• How to unzip?
• Python Arrays:
• Case studies
Tuple Collection
• What is tuple?
• Different ways of creating Tuple
• Method of Tuple object
• Tuple is Immutable
• Mutable and Immutable elements of Tuple
• Process tuple through Indexing and Slicing
• List v/s Tuple
• Case studies
Set Collection
• What is set?
• Different ways of creating set
• Difference between list and set
• Iteration Over Sets
• Accessing elements of set
• Python Set Methods
• Python Set Operations
• Union of sets
• functions and methods of set
• Python Frozen set
• Difference between set and frozenset ?
• Case study
Dictionary Collection
• What is dictionary?
• Difference between list, set and dictionary
• How to create a dictionary?
• PYTHON HASHING?
• Accessing values of dictionary
• Python Dictionary Methods
• Copying dictionary
• Updating Dictionary
• Reading keys from Dictionary
• Reading values from Dictionary
• Reading items from Dictionary
• Delete Keys from the dictionary
• Sorting the Dictionary
• Python Dictionary Functions and methods
• Dictionary comprehension
Functions
• What is Function?
• Advantages of functions
• Syntax and Writing function
• Calling or Invoking function
• Classification of Functions
o No arguments and No return values
o With arguments and No return values
o With arguments and With return values
o No arguments and With return values
o Recursion
• Python argument type functions :
o Default argument functions
o Required(Positional) arguments function
o Keyword arguments function
o Variable arguments functions
• ‘pass’ keyword in functions
• Lambda functions/Anonymous functions
o map()
o filter()
o reduce()
• Nested functions
• Non local variables, global variables
• Closures
• Decorators
• Generators
• Iterators
• Monkey patching
Advanced Python
Python Modules
Packages
OOPs
1. i) Method overriding
2. ii) Constructor overriding
• Overloading
1. i) Method Overloading
2. ii) Constructor Overloading
• What is Exception?
• Why exception handling?
• Syntax error v/s Runtime error
• Exception codes – AttributeError, ValueError, IndexError, TypeError…
o Handling exception – try except block
o Try with multi except
o Handling multiple exceptions with single except block
• Finally block
o Try-except-finally
o Try with finally
o Case study of finally block
• Raise keyword
o Custom exceptions / User defined exceptions
o Need to Custom exceptions
• Case studies
Regular expressions
• Introduction to files
• Opening file
• File modes
• Reading data from file
• Writing data into file
• Appending data into file
• Line count in File
• CSV module
• Creating CSV file
• Reading from CSV file
• Writing into CSV file
• Object serialization – pickle module
• XML parsing
• JSON parsing
Python Logging
• Logging Levels
• implement Logging
• Configure Log File in over writing Mode
• Timestamp in the Log Messages
• Python Program Exceptions to the Log File
• Requirement of Our Own Customized Logger
• Features of Customized Logger
OS module
• Introduction
• Multi tasking v/s Multi threading
• Threading module
• Creating thread – inheriting Thread class , Using callable object
• Life cycle of thread
• Single threaded application
• Multi threaded application
• Can we call run() directly?
• Need to start() method
• Sleep()
• Join()
• Synchronization – Lock class – acquire(), release() functions
• Case studies
Garbage collection
• Introduction
• Importance of Manual garbage collection
• Self reference objects garbage collection
• ‘gc’ module
• Collect() method
• Threshold function
• Case studies
• What is Sockets?
• What is Socket Programming?
• The socket Module
• Server Socket Methods
• Connecting to a server
• A simple server-client program
• Server
• Client
• Numpy
• Introduction
• Scipy
• Introduction
• Arrays
• Datatypes
• Matrices
• N dimension arrays
• Indexing and Slicing
• Pandas
• Introduction
• Data Frames
• Merge , Join, Concat
• MatPlotLib introduction
• Drawing plots
• Introduction to Machine learning
• Types of Machine Learning?
• Introduction to Data science
PANDAS
Pandas – Introduction
Pandas — Series
• Series
• Create an Empty Series
• Create a Series f
• rom ndarray
• rom dict
• rom Scalar
• Accessing Data from Series with Position
• Retrieve Data Using Label (Index)
Pandas – DataFrame
• DataFrame
• Create DataFrame
• Create an Empty DataFrame
• Create a DataFrame from Lists
• Create a DataFrame from Dict of ndarrays / Lists
• Create a DataFrame from List of Dicts
• Create a DataFrame from Dict of Series
• Column Selection
• Column Addition
• Column Deletion
• Row Selection, Addition, and Deletion
Pandas – Panel
• Panel()
• Create Panel
• Selecting the Data from Panel
Pandas – Reindexing
Pandas – Iteration
• Iterating a DataFrame
• iteritems()
• iterrows()
• itertuples()
Pandas – Sorting
• By Label
• Sorting Algorithm
• get_option(param)
• set_option(param,value)
• reset_option(param)
• describe_option(param)
• option_context()
• .loc()
• .iloc()
• .ix()
• Use of Notations
• Percent_change
• Covariance
• Correlation
• Data Ranking
• .rolling() Function
• .expanding() Function
• .ewm() Function
Pandas – Aggregations
Pandas – Merging/Joining
Pandas – Concatenation
• Concatenating Objects
• Time Series
Pandas – Timedelta
• Object Creation
Pandas – Visualization
• Bar Plot
• Histograms
• Box Plots
• Area Plot
• Scatter Plot
• Pie Chart
Pandas – IO Tools
• csv
NUMPY
NUMPY − INTRODUCTION
NUMPY − ENVIRONMENT
• shape
• ndim
• itemsize
• flags
• empty
• zeros
• ones
• asarray
• frombuffer
• fromiter
• arange
• linspace
• logspace
• Integer Indexing
• Boolean Array Indexing
NUMPY − BROADCASTING
• Iteration
• Order
• Modifying Array Values
• External Loop
• Broadcasting Iteration
• reshape
• ndarray.flat
• ndarray.flatten
• ravel
• transpose
• ndarray.T
• swapaxes
• rollaxis
• broadcast
• broadcast_to
• expand_dims
• squeeze
• concatenate
• stack
• hstack and numpy.vstack
• split
• hsplit and numpy.vsplit
• resize
• append
• insert
• delete
• unique
• bitwise_and
• bitwise_or
• invert()
• left_shift
• right_shift
• Trigonometric Functions
• Functions for Rounding
• sort()
• argsort()
• lexsort()
• argmax() and numpy.argmin()
• nonzero()
• where()
• extract()
• ndarray.byteswap()
• No Copy
• View or Shallow Copy
• Deep Copy
• empty()
• matlib.zeros()
• matlib.ones()
• matlib.eye()
• matlib.identity()
• matlib.rand()
• dot()
• vdot()
• inner()
• matmul()
• Determinant
• linalg.solve()
NUMPY − MATPLOTLIB
• histogram()
• plt()
• save()
• savetxt()