AI-2 Course A

Advanced Python, Data Cleaning, Feature Engineering & Math for AI

Week 1: Advanced Python for AI

Solidify advanced Python skills and introduce professional developer tools (Git/GitHub) to establish a robust workflow for all future projects.

5 Days / 5 Hours
Day 1
Python review
Objectives
  • Review core Python concepts essential for AI.
  • Write modular and reusable functions for data workflows.
Activity

Refactor a script with repeated code into clean, modular functions.

Assessment

Code submission: A Python script demonstrating modular design.

Day 2
Functions
Objectives
  • Master advanced function concepts.
  • Understand scope and return values in depth.
Activity

Create a library of utility functions for common data tasks.

Assessment

Mini-quiz on function scope and arguments.

Day 3
Lambda + .apply()
Objectives
  • Write and use lambda functions for concise operations.
  • Apply functions to Pandas DataFrames using .apply().
Activity

Use .apply() with a lambda function to clean a column in a sample dataset (e.g., remove currency symbols).

Assessment

Code submission: A Jupyter notebook showing the use of lambda and apply.

Day 4
Dictionaries
Objectives
  • Manipulate nested dictionaries and complex data structures.
  • Understand dictionary comprehensions.
Activity

Parse a complex nested dictionary representing a student database.

Assessment

Code challenge: Extract specific data points from a nested structure.

Day 5
JSON + file handling
Objectives
  • Parse and manipulate JSON files commonly used in APIs.
  • Perform file handling operations for reading/writing data.
Activity

Git & GitHub Mini-Workshop: Create repository, upload notebook, learn version control basics.

Assessment

Peer review: Students share their GitHub repository links and confirm successful setup.