Python for Data Science

  1. Python Programming Fundamentals
    1. Basic Syntax and Structure
      1. Python Syntax Rules
        1. Indentation and Code Blocks
          1. Comments and Documentation
            1. Line Continuation
              1. Statement Separators
              2. Variables and Assignment
                1. Variable Declaration
                  1. Naming Conventions
                    1. PEP 8 Guidelines
                      1. Snake Case vs Camel Case
                      2. Dynamic Typing
                        1. Variable Scope
                          1. Local Scope
                            1. Global Scope
                              1. Nonlocal Scope
                            2. Basic Data Types
                              1. Numeric Types
                                1. Integers
                                  1. Integer Literals
                                    1. Integer Operations
                                      1. Large Integer Handling
                                      2. Floating Point Numbers
                                        1. Float Precision
                                          1. Scientific Notation
                                            1. Float Operations and Precision Issues
                                            2. Complex Numbers
                                              1. Type Conversion and Casting
                                              2. Text Data
                                                1. Strings
                                                  1. String Literals and Quotes
                                                    1. Escape Characters
                                                      1. Raw Strings
                                                        1. String Indexing and Slicing
                                                          1. String Methods
                                                            1. Case Conversion
                                                              1. Search and Replace
                                                                1. Split and Join
                                                                  1. Strip and Padding
                                                                  2. String Formatting
                                                                    1. Old-style Formatting
                                                                      1. str.format() Method
                                                                        1. f-strings (Formatted String Literals)
                                                                    2. Boolean Data
                                                                      1. Boolean Values
                                                                        1. Boolean Operations
                                                                          1. Truthiness and Falsiness
                                                                            1. Logical Operators
                                                                              1. and Operator
                                                                                1. or Operator
                                                                                  1. not Operator
                                                                                    1. Short-circuit Evaluation
                                                                              2. Core Data Structures
                                                                                1. Sequential Data Types
                                                                                  1. Lists
                                                                                    1. List Creation
                                                                                      1. Empty Lists
                                                                                        1. List Literals
                                                                                          1. List Constructor
                                                                                          2. List Indexing
                                                                                            1. Positive Indexing
                                                                                              1. Negative Indexing
                                                                                              2. List Slicing
                                                                                                1. Basic Slicing
                                                                                                  1. Step Parameter
                                                                                                    1. Slice Assignment
                                                                                                    2. List Methods
                                                                                                      1. Adding Elements
                                                                                                        1. append()
                                                                                                          1. insert()
                                                                                                            1. extend()
                                                                                                            2. Removing Elements
                                                                                                              1. remove()
                                                                                                                1. pop()
                                                                                                                  1. clear()
                                                                                                                  2. Searching and Counting
                                                                                                                    1. index()
                                                                                                                      1. count()
                                                                                                                      2. Sorting and Reversing
                                                                                                                        1. sort()
                                                                                                                          1. reverse()
                                                                                                                            1. sorted() Function
                                                                                                                          2. List Comprehensions
                                                                                                                            1. Basic Syntax
                                                                                                                              1. Conditional Comprehensions
                                                                                                                                1. Nested Comprehensions
                                                                                                                                2. Nested Lists
                                                                                                                                  1. Creating 2D Lists
                                                                                                                                    1. Accessing Nested Elements
                                                                                                                                  2. Tuples
                                                                                                                                    1. Tuple Creation
                                                                                                                                      1. Tuple Literals
                                                                                                                                        1. Single Element Tuples
                                                                                                                                          1. Tuple Constructor
                                                                                                                                          2. Tuple Immutability
                                                                                                                                            1. Tuple Indexing and Slicing
                                                                                                                                              1. Tuple Methods
                                                                                                                                                1. count()
                                                                                                                                                  1. index()
                                                                                                                                                  2. Tuple Unpacking
                                                                                                                                                    1. Multiple Assignment
                                                                                                                                                      1. Swapping Variables
                                                                                                                                                        1. Function Return Values
                                                                                                                                                        2. Named Tuples
                                                                                                                                                      2. Mapping Data Types
                                                                                                                                                        1. Dictionaries
                                                                                                                                                          1. Dictionary Creation
                                                                                                                                                            1. Dictionary Literals
                                                                                                                                                              1. Dictionary Constructor
                                                                                                                                                                1. Dictionary Comprehensions
                                                                                                                                                                2. Accessing Dictionary Elements
                                                                                                                                                                  1. Key-based Access
                                                                                                                                                                    1. get() Method
                                                                                                                                                                      1. Handling Missing Keys
                                                                                                                                                                      2. Modifying Dictionaries
                                                                                                                                                                        1. Adding Key-Value Pairs
                                                                                                                                                                          1. Updating Values
                                                                                                                                                                            1. Removing Elements
                                                                                                                                                                              1. del Statement
                                                                                                                                                                                1. pop() Method
                                                                                                                                                                                  1. popitem() Method
                                                                                                                                                                                2. Dictionary Methods
                                                                                                                                                                                  1. keys()
                                                                                                                                                                                    1. values()
                                                                                                                                                                                      1. items()
                                                                                                                                                                                        1. update()
                                                                                                                                                                                          1. clear()
                                                                                                                                                                                          2. Dictionary Iteration
                                                                                                                                                                                            1. Iterating Over Keys
                                                                                                                                                                                              1. Iterating Over Values
                                                                                                                                                                                                1. Iterating Over Key-Value Pairs
                                                                                                                                                                                                2. Nested Dictionaries
                                                                                                                                                                                              2. Set Data Types
                                                                                                                                                                                                1. Sets
                                                                                                                                                                                                  1. Set Creation
                                                                                                                                                                                                    1. Set Literals
                                                                                                                                                                                                      1. Set Constructor
                                                                                                                                                                                                        1. Set Comprehensions
                                                                                                                                                                                                        2. Set Properties
                                                                                                                                                                                                          1. Uniqueness
                                                                                                                                                                                                            1. Mutability
                                                                                                                                                                                                            2. Set Operations
                                                                                                                                                                                                              1. Union
                                                                                                                                                                                                                1. Intersection
                                                                                                                                                                                                                  1. Difference
                                                                                                                                                                                                                    1. Symmetric Difference
                                                                                                                                                                                                                    2. Set Methods
                                                                                                                                                                                                                      1. add()
                                                                                                                                                                                                                        1. remove()
                                                                                                                                                                                                                          1. discard()
                                                                                                                                                                                                                            1. pop()
                                                                                                                                                                                                                              1. clear()
                                                                                                                                                                                                                              2. Frozen Sets
                                                                                                                                                                                                                          2. Control Flow Structures
                                                                                                                                                                                                                            1. Conditional Statements
                                                                                                                                                                                                                              1. if Statements
                                                                                                                                                                                                                                1. Basic if Syntax
                                                                                                                                                                                                                                  1. Comparison Operators
                                                                                                                                                                                                                                    1. Membership Operators
                                                                                                                                                                                                                                      1. Identity Operators
                                                                                                                                                                                                                                      2. elif and else Clauses
                                                                                                                                                                                                                                        1. Multiple Conditions
                                                                                                                                                                                                                                          1. elif Chains
                                                                                                                                                                                                                                            1. else as Default Case
                                                                                                                                                                                                                                            2. Nested Conditionals
                                                                                                                                                                                                                                              1. Indentation Rules
                                                                                                                                                                                                                                                1. Avoiding Deep Nesting
                                                                                                                                                                                                                                                2. Ternary Operator
                                                                                                                                                                                                                                                3. Iteration and Loops
                                                                                                                                                                                                                                                  1. for Loops
                                                                                                                                                                                                                                                    1. Iterating Over Sequences
                                                                                                                                                                                                                                                      1. Lists and Tuples
                                                                                                                                                                                                                                                        1. Strings
                                                                                                                                                                                                                                                          1. Dictionaries
                                                                                                                                                                                                                                                          2. Using range()
                                                                                                                                                                                                                                                            1. range() Parameters
                                                                                                                                                                                                                                                              1. Memory Efficiency
                                                                                                                                                                                                                                                              2. Advanced Iteration
                                                                                                                                                                                                                                                                1. enumerate() Function
                                                                                                                                                                                                                                                                  1. zip() Function
                                                                                                                                                                                                                                                                    1. reversed() Function
                                                                                                                                                                                                                                                                    2. Nested for Loops
                                                                                                                                                                                                                                                                    3. while Loops
                                                                                                                                                                                                                                                                      1. Loop Conditions
                                                                                                                                                                                                                                                                        1. Infinite Loops
                                                                                                                                                                                                                                                                          1. Loop Termination Strategies
                                                                                                                                                                                                                                                                            1. Input Validation Loops
                                                                                                                                                                                                                                                                            2. Loop Control Statements
                                                                                                                                                                                                                                                                              1. break Statement
                                                                                                                                                                                                                                                                                1. Early Loop Exit
                                                                                                                                                                                                                                                                                  1. Breaking from Nested Loops
                                                                                                                                                                                                                                                                                  2. continue Statement
                                                                                                                                                                                                                                                                                    1. Skipping Iterations
                                                                                                                                                                                                                                                                                    2. pass Statement
                                                                                                                                                                                                                                                                                      1. Placeholder Syntax
                                                                                                                                                                                                                                                                                    3. Loop-Else Construct
                                                                                                                                                                                                                                                                                      1. else with for Loops
                                                                                                                                                                                                                                                                                        1. else with while Loops
                                                                                                                                                                                                                                                                                    4. Functions and Modular Programming
                                                                                                                                                                                                                                                                                      1. Function Basics
                                                                                                                                                                                                                                                                                        1. Function Definition
                                                                                                                                                                                                                                                                                          1. def Keyword
                                                                                                                                                                                                                                                                                            1. Function Naming
                                                                                                                                                                                                                                                                                              1. Function Body
                                                                                                                                                                                                                                                                                              2. Function Documentation
                                                                                                                                                                                                                                                                                                1. Docstrings
                                                                                                                                                                                                                                                                                                  1. Documentation Standards
                                                                                                                                                                                                                                                                                                    1. Help System Integration
                                                                                                                                                                                                                                                                                                    2. Function Calling
                                                                                                                                                                                                                                                                                                      1. Function Invocation
                                                                                                                                                                                                                                                                                                        1. Return Values
                                                                                                                                                                                                                                                                                                      2. Function Parameters and Arguments
                                                                                                                                                                                                                                                                                                        1. Parameter Types
                                                                                                                                                                                                                                                                                                          1. Positional Parameters
                                                                                                                                                                                                                                                                                                            1. Keyword Parameters
                                                                                                                                                                                                                                                                                                              1. Default Parameters
                                                                                                                                                                                                                                                                                                                1. Mutable Default Arguments
                                                                                                                                                                                                                                                                                                                  1. Best Practices
                                                                                                                                                                                                                                                                                                                2. Variable-Length Arguments
                                                                                                                                                                                                                                                                                                                  1. *args (Arbitrary Positional Arguments)
                                                                                                                                                                                                                                                                                                                    1. **kwargs (Arbitrary Keyword Arguments)
                                                                                                                                                                                                                                                                                                                      1. Combining Parameter Types
                                                                                                                                                                                                                                                                                                                      2. Argument Unpacking
                                                                                                                                                                                                                                                                                                                        1. Unpacking Lists and Tuples
                                                                                                                                                                                                                                                                                                                          1. Unpacking Dictionaries
                                                                                                                                                                                                                                                                                                                        2. Function Return Values
                                                                                                                                                                                                                                                                                                                          1. Single Return Values
                                                                                                                                                                                                                                                                                                                            1. Multiple Return Values
                                                                                                                                                                                                                                                                                                                              1. Early Returns
                                                                                                                                                                                                                                                                                                                                1. None as Default Return
                                                                                                                                                                                                                                                                                                                                2. Advanced Function Concepts
                                                                                                                                                                                                                                                                                                                                  1. Lambda Functions
                                                                                                                                                                                                                                                                                                                                    1. Lambda Syntax
                                                                                                                                                                                                                                                                                                                                      1. Use Cases
                                                                                                                                                                                                                                                                                                                                        1. Limitations
                                                                                                                                                                                                                                                                                                                                          1. Comparison with Regular Functions
                                                                                                                                                                                                                                                                                                                                          2. Higher-Order Functions
                                                                                                                                                                                                                                                                                                                                            1. Functions as Arguments
                                                                                                                                                                                                                                                                                                                                              1. Functions as Return Values
                                                                                                                                                                                                                                                                                                                                                1. Built-in Higher-Order Functions
                                                                                                                                                                                                                                                                                                                                                  1. map()
                                                                                                                                                                                                                                                                                                                                                    1. filter()
                                                                                                                                                                                                                                                                                                                                                      1. reduce()
                                                                                                                                                                                                                                                                                                                                                    2. Function Scope and Closures
                                                                                                                                                                                                                                                                                                                                                      1. Local vs Global Variables
                                                                                                                                                                                                                                                                                                                                                        1. global Keyword
                                                                                                                                                                                                                                                                                                                                                          1. nonlocal Keyword
                                                                                                                                                                                                                                                                                                                                                            1. Closure Behavior
                                                                                                                                                                                                                                                                                                                                                            2. Decorators
                                                                                                                                                                                                                                                                                                                                                              1. Decorator Concept
                                                                                                                                                                                                                                                                                                                                                                1. Function Decorators
                                                                                                                                                                                                                                                                                                                                                                  1. Built-in Decorators
                                                                                                                                                                                                                                                                                                                                                                    1. @property
                                                                                                                                                                                                                                                                                                                                                                      1. @staticmethod
                                                                                                                                                                                                                                                                                                                                                                        1. @classmethod
                                                                                                                                                                                                                                                                                                                                                                  2. File Input and Output
                                                                                                                                                                                                                                                                                                                                                                    1. File System Navigation
                                                                                                                                                                                                                                                                                                                                                                      1. File Paths
                                                                                                                                                                                                                                                                                                                                                                        1. Absolute vs Relative Paths
                                                                                                                                                                                                                                                                                                                                                                          1. Path Separators
                                                                                                                                                                                                                                                                                                                                                                            1. os.path Module
                                                                                                                                                                                                                                                                                                                                                                              1. pathlib Module
                                                                                                                                                                                                                                                                                                                                                                              2. Directory Operations
                                                                                                                                                                                                                                                                                                                                                                                1. Current Working Directory
                                                                                                                                                                                                                                                                                                                                                                                  1. Listing Directory Contents
                                                                                                                                                                                                                                                                                                                                                                                    1. Creating and Removing Directories
                                                                                                                                                                                                                                                                                                                                                                                  2. File Operations
                                                                                                                                                                                                                                                                                                                                                                                    1. Opening Files
                                                                                                                                                                                                                                                                                                                                                                                      1. open() Function
                                                                                                                                                                                                                                                                                                                                                                                        1. File Modes
                                                                                                                                                                                                                                                                                                                                                                                          1. Read Mode
                                                                                                                                                                                                                                                                                                                                                                                            1. Write Mode
                                                                                                                                                                                                                                                                                                                                                                                              1. Append Mode
                                                                                                                                                                                                                                                                                                                                                                                                1. Binary Mode
                                                                                                                                                                                                                                                                                                                                                                                                2. File Encoding
                                                                                                                                                                                                                                                                                                                                                                                                3. Reading from Files
                                                                                                                                                                                                                                                                                                                                                                                                  1. Reading Entire Files
                                                                                                                                                                                                                                                                                                                                                                                                    1. Reading Line by Line
                                                                                                                                                                                                                                                                                                                                                                                                      1. Reading Specific Amounts
                                                                                                                                                                                                                                                                                                                                                                                                      2. Writing to Files
                                                                                                                                                                                                                                                                                                                                                                                                        1. Writing Text Data
                                                                                                                                                                                                                                                                                                                                                                                                          1. Writing Multiple Lines
                                                                                                                                                                                                                                                                                                                                                                                                            1. Appending to Existing Files
                                                                                                                                                                                                                                                                                                                                                                                                            2. File Closing and Resource Management
                                                                                                                                                                                                                                                                                                                                                                                                              1. Explicit File Closing
                                                                                                                                                                                                                                                                                                                                                                                                                1. Context Managers
                                                                                                                                                                                                                                                                                                                                                                                                                  1. with Statement
                                                                                                                                                                                                                                                                                                                                                                                                                    1. Automatic Resource Cleanup
                                                                                                                                                                                                                                                                                                                                                                                                                2. Error Handling in File Operations
                                                                                                                                                                                                                                                                                                                                                                                                                  1. Common File Exceptions
                                                                                                                                                                                                                                                                                                                                                                                                                    1. FileNotFoundError
                                                                                                                                                                                                                                                                                                                                                                                                                      1. PermissionError
                                                                                                                                                                                                                                                                                                                                                                                                                        1. IOError
                                                                                                                                                                                                                                                                                                                                                                                                                        2. Exception Handling
                                                                                                                                                                                                                                                                                                                                                                                                                          1. try-except Blocks
                                                                                                                                                                                                                                                                                                                                                                                                                            1. finally Blocks
                                                                                                                                                                                                                                                                                                                                                                                                                        3. Object-Oriented Programming Fundamentals
                                                                                                                                                                                                                                                                                                                                                                                                                          1. Classes and Objects
                                                                                                                                                                                                                                                                                                                                                                                                                            1. Class Definition
                                                                                                                                                                                                                                                                                                                                                                                                                              1. class Keyword
                                                                                                                                                                                                                                                                                                                                                                                                                                1. Class Naming Conventions
                                                                                                                                                                                                                                                                                                                                                                                                                                  1. Class Body
                                                                                                                                                                                                                                                                                                                                                                                                                                  2. Object Instantiation
                                                                                                                                                                                                                                                                                                                                                                                                                                    1. Creating Objects
                                                                                                                                                                                                                                                                                                                                                                                                                                      1. Object Identity
                                                                                                                                                                                                                                                                                                                                                                                                                                        1. Object References
                                                                                                                                                                                                                                                                                                                                                                                                                                      2. Attributes and Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                        1. Instance Attributes
                                                                                                                                                                                                                                                                                                                                                                                                                                          1. Attribute Assignment
                                                                                                                                                                                                                                                                                                                                                                                                                                            1. Attribute Access
                                                                                                                                                                                                                                                                                                                                                                                                                                              1. Dynamic Attribute Creation
                                                                                                                                                                                                                                                                                                                                                                                                                                              2. Class Attributes
                                                                                                                                                                                                                                                                                                                                                                                                                                                1. Shared Data
                                                                                                                                                                                                                                                                                                                                                                                                                                                  1. Class vs Instance Attributes
                                                                                                                                                                                                                                                                                                                                                                                                                                                  2. Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                    1. Instance Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. The self Parameter
                                                                                                                                                                                                                                                                                                                                                                                                                                                        1. Method Definition and Calling
                                                                                                                                                                                                                                                                                                                                                                                                                                                        2. Special Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                          1. init Method
                                                                                                                                                                                                                                                                                                                                                                                                                                                            1. str Method
                                                                                                                                                                                                                                                                                                                                                                                                                                                              1. repr Method
                                                                                                                                                                                                                                                                                                                                                                                                                                                                1. Other Dunder Methods
                                                                                                                                                                                                                                                                                                                                                                                                                                                              2. Inheritance and Polymorphism
                                                                                                                                                                                                                                                                                                                                                                                                                                                                1. Basic Inheritance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  1. Parent and Child Classes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    1. Method Inheritance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. Method Overriding
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2. super() Function
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        1. Multiple Inheritance
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          1. Polymorphism Concepts
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2. Error Handling and Debugging
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          1. Exception Handling
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            1. Understanding Exceptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              1. Exception Hierarchy
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                1. Common Exception Types
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2. try-except Blocks
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  1. Basic Exception Handling
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    1. Handling Multiple Exceptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. Exception Information
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2. finally and else Clauses
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        1. Raising Exceptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          1. raise Statement
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            1. Custom Exceptions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          2. Debugging Techniques
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            1. Python Debugger (pdb)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              1. IDE Debugging Features
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                1. Logging
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  1. logging Module
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    1. Log Levels
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. Log Formatting