ProfessionalPython PDF
ProfessionalPython PDF
PYTHON CORE
3. Data Structures
1. Introduction o List
o Distributions – python.org, Anaconda Python o Introduction to List
o Shells – Python, Jupyter o Purpose of a List
o IDEs – PyCharm, Spyder, Eclipse o Iterating through a List
o Editors - Visual Studio Code o List slicing, -ve indexing
o First program - ‘Hello World!’ o List functions
o Interpretation and .pyc, .pyo files o List Operations
o Python data types o List of Lists
o type(), id(), sys.getsizeof() o Comparing Lists
o Values, Variables, Identifiers & Labels o Homogeneous data
o Python labeling system o Built-in array.array()
o Object pooling o numpy.array()
o Conversion functions o Tuple
o The language which knew Infinity o Introduction of Tuple
o Console input, output o Tuple Slicing
o Operators in Python o -ve indexing
o Strings o Iterating through a Tuple
o Encoding o List of Tuples
o Define a string - Multiple quotes and o Purpose of a Tuple
Multiple lines o List Vs Tuple
o String functions o Set
o String slicing - start, end & step o Introduction of Set
o -ve indexing o How to remove duplicates in a List?
o Built-in functions o How Set removes duplicates?
o Set functions
2. Control Structures o Sets are hashable but Lists are unhashable
o Execution flow of a Program o Set Use-Cases:
o Conditional statements o Removing duplicates
o if, if-else, if-elif, if-elif-else o Common and uncommon items
o Multiple if & Nested if-else o Lookup table
o Looping statements o Dictionary (Most Popular Data Structure)
o while & while-else o Introduction of Dictionary -
o for loop Associative data structure
o range() o Creating a Dictionary
o xrange() - Legacy o Adding elements to Dictionary
o Containers, Generator & Iterator o Deleting key value pair
o for-else o Updating / extending a Dictionary
o break & continue o Iterating through a Dictionary
o When to use for-else? o Tuple unpacking method
o Converting List/Tuples of Tuples/Lists o Returning a function from another function
into Dictionary o Passing a function to another function along
o Converting Dictionary to List of Tuples with its arguments
o Introduction to Lambda o Call-back functions and delegation
o Sorting List of Tuples and Dictionaries o Decorators
o Finding max(), min() in a Dictionary o Creating decorators
o Wherever you go, Dictionary follows o Multiple decorators
you! o Use case - timeit
o USE CASES: o Generator
o Counting Problem o Creating custom generators
o Grouping Problem o Use case - Lazy evaluation
o Indexing
o Caching 6. Modules
o Keep the latest o Python Code Files
o Counter() - simplest counting algorithm o Importing functions from another file
o DefaultDict - Always has a value o __name __: Preventing unwanted code
o OrderedDict - Maintains order execution
o Dequeue - Short time memory loss o Importing from a folder
o Forzenset() – hashable set o Folders Vs Packages
o namedtuple() – hashable dict o __init__.py
o Heapq - efficient in-memory min-heap() o Namespace
o Importance of Hashability o __all__
o Packing and Unpacking o import *
o Swapping two values o Private global variables and functions
o Iterator using iter() and next() o __builtins__
o Recursive imports
4. Functions o Use case: Project Structure
o Purpose of a function
o Defining a function 7. Comprehensions
o Calling a function o List comprehension
o Function parameter passing o Tuple comprehension & generator
o Formal arguments o Set comprehension
o Actual arguments o Dictionary comprehension
o Positional arguments o enumerate
o Keyword arguments o Zip and Unzip
o Variable arguments
o Variable keyword arguments 8. Functional Programming
o Use case *args, **kwargs o Procedural vs Functional
o Function call stack o Pure Functions
o locals() o map()
o globals() o reduce()
o Stackframe o filter()
o Call-by-object-reference o Lambdas
o Shallow copy - copy.copy() o Loop vs Comprehension vs Map
o Deep copy - copy.deepcopy() o functools module
o Recursion & Caching
9. File – IO
5. Decorators and Generators o Creating File
o Passing one function to another function o File reading & writing
o Defining one function within another function o Line by line file reading
o Writing multiple lines
o seek() 11. Exception Handling
o tell() o Purpose of Exception Handling
o Working with csv, openpyxl o try block
o Binary files o except block
o Pickling o else block
o Use case - Cleaning text o finally block
o Built-in exceptions
ASSIGNMENT I – Students and Faculties o Order of ‘except’ statements
o Exception - mother of all exceptions
PYTHON ADVANCED o Writing Custom exceptions
o Stack Unwinding
10. Object Orientation o Use case - finally
o Once upon a time when there was no OOPS
o Purpose of Object Orientation 12. Descriptors
o Design starts with Data Binding o Definition and Introduction
o Abstraction - What the world sees o Descriptor Protocol
o Data hiding - What is hidden o Invoking Descriptors
o Encapsulation - Boundary between o Descriptor Example
Abstraction and Data hiding o Properties
o Class - Classification of type o Functions and Methods
o Creating a class type
o Creating multiple instances of a functionality 13. Multi-Threading
o Object - The physical existence of a class o Program Memory Layout
o __init__() - the initializer o Concurrency
o Data members o Parallelism
o Member functions(methods) o Process
o Method invocation o Thread of execution
o Printing objects o Creating a thread
o __str__ () and __ repr__() o Joining a thread
o Inheritance o Critical section
o Use case – Bluetooth 4.0 o Lock and Conditional variable
o Types of inheritance o Wait, notify, notify all
o Diamond problem o How much concurrency is required?
o MRO o GIL
o Private members o Multiprocessing
o Creating inline objects, classes, types o Python on JVM - Jython and threading
o Class method o Python on CLR - IronPython and threading
o Static method and static variables o Producer - Consumer: 1 Dad - 2 Sons
o Function Objects (Functor) – Callable o Lock-free Programming Introduction
o Objects Class as decorator and Context
manager Polymorphism - Incorporating 14. Database connections – MySQL &
changes Operator Overloading
o __lt__ ()
Mongo
o Database introduction
o __add__ ()
o MySQL & MongoDB database connection
o __hash__ ()
setup
o __eq__ ()
o Installing connector
o Function Overloading in Python
o Cursor
o Sorting objects
o Running a query
o Hashing objects
o Iterating a cursor/object
o Fetching data o TCP/IP Basics
o Closing a connection o 3-way and 4-way Handshake
o Socket programming
15. Regular Expressions o Simple TCP Client – Server
o Functions o Simple UDP Client – Server
o re.match() o Emailing - smtplib
o re.search() o FTP
o re.findall()
o Regex symbols ASSIGNMENT II– Students & Faculties using Classes
o Greedy and non-greedy
DATA ANALYSIS
16. Essential Modules
o datetime
o time
21. NumPy
o NumPy arrays
o pytz
o Double dimension arrays
o sys & os
o Resizing, reshaping
o random
o Vector multiplication
o Boolean filtering
17. Serialization Pickling, XML & JSON
o Querying using where () function
o Introduction to Serialization
o Indexing
o Structure and Container
o Slicing
o Pickle Module
o Mean, Median, Standard deviation,
o Pickling built-in data structures
Average
o byte strings
o Transpose
o binary
o Broadcasting
o XML parsing and construction - xml, lxml
o NumPy matrix
o JSON parsing and construction - json,
o Addition, multiplication
simplejson
o Transpose, inverse
o NumPy random module
18. Unit Testing
o Purpose of Unit testing
22. Pandas
o unittest module
o Series
o Testcase & Test Scenario
o Constructing from dictionaries
o assert ()
o Custom Index
o nosetests module
o Data Filtering
o coverage module - Code coverage
o Data Frames
o Mocking – faking
o Constructing from a dictionary with
o Profiling values as Lists
o Custom Indexing
19. Logging o Rearranging the columns
o Purpose of logging o ioc(), iloc(), at() & iat()
o Logging levels o Assigning a column to the dataframe
o Types of logging o Adding a new column
o Logging format o Deleting a column
o Logging Handlers o Slicing
o Use case- Rotating File Logger o Indexing and Advanced Indexing
o Disadvantages of excessive logging o Boolean Indexing
o Custom loggers o Transposing
o Sort by
20. Networking (Optional) o Concatenate
o Merge o Creating Model classes
o Inner join o Admin Interface
o Outer join o Adding Data through Admin Interface
o Join o Templating and Rendering
o Group by Aggregation o Creating Django Apps
o Data Munging o URL Routing
o Working with missing data o Django Template tags and template
o Reading Data from CSV, Excel, JSON programming
o Writing Data to CSV, Excel, JSON, HTML o Django rest framework
o Reading data from database and storing in o Understanding REST Architecture
dataframe o HTTP GET, PUT, POST, DELETE and UPDATE
o Writing dataframe to database o Serializer classes
o Handling PDF files - tabula-py o JSON serialization
o Writing REST API
23. Matplotlib o Flask Introduction
o Basic Plotting o Flask RESTPlus & Swagger API Documentation
o Colors o Testing with Postman
o Styles o Testing REST API
o Seaborn themes o Nginx Setup & AWS Deployment walkthrough
o Labels o Working with domain names setting public IP
o Title walkthrough
o Legend
ASSIGNMENT IV –
o Axis
o Bar chart o Employee Management System API
o IMDB API
o Histogram
o Scatter plot o International Cricket API
o Box plot
o Pie chart DEVELOPMENT LIFE CYCLE
ASSIGNMENT III – 911 Data Analysis & Visualization 25. Agile Methodologies
o A day in an agile project
WEB AND FRAMEWORKS o Roles of team & Scrum Master
o Backlogs
24. Django & Flask with REST Webservices o User Story
o Client Server architecture o Story points
o MVC and MVT o Estimation
o Web Application o Team Velocity
o Website o Planning
o Web server – Apache, Nginx, Node o Daily Standup Meeting
o Web client o Retrospection
o Web framework o Review Meetings
o Introduction to Ubuntu Linux o Agile Delivery
o Installing MySQL
o Creating virtual environments for python3 VERSION CONTROL
o Installing Django modules
o Creating first basic Django Project 26. GitHub
o Web-News Use case o Code Versioning System
o Process of Migrations o Create Repository
o Request response cycle o Create a Branch
o Understanding ORM
o Cloning Repository
o Make & Commit Changes
o Branching
o Merging Conflicts
o Using Bitbucket
DATABASES
27. MySQL
o MySQL Features
o Installation of Database
o CRUD operations
o Table & Views
o MySQL Clauses and Conditions
o MySQL Join
o Aggregate Functions
28. MongoDB
o MongoDB Features
o Advantages over RDBMS
o Installation of MongoDB
o Understanding the terminology
o CRUD operations
o Aggregation
31. Reasoning
o Series
o Analogy
o Coding-Decoding
o Directions
o Symbols and Notations
o Blood Relations
o Puzzles