Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Python Applications for Business

Exam I Overview

Exam I has three parts. Part I and Part II will be paper-based in-class exams, while Part III is a take- home exam. The exam is open book and open notes. However, all work must be your own individual effort; no collaboration or peer discussion is allowed.

The exam will be available on Course Site under the Exam folder. Part I and Part II will be administered in class on Wednesday, October 8, and you will have 75 minutes to complete them on paper. Part III will be released on Monday, October 6, and must be submitted together with Parts I and II on October 8.

The exam has three parts:

•    Part I: Fundamentals Check – Similar to our weekly quizzes. It will include approximately 30 Multiple-Choice and True/False questions, each with only one correct answer.

•    Part II: Debug & Fix – Two code debugging exercises, completed on paper.

•    Part III: Build & Apply – Two coding problems completed through Colab. These will be similar to lab and lecture exercises and worked on at home before October 8.

Important rules:

•    Academic Integrity: All work must be yours alone. No collaboration, peer discussion, or sharing of solutions is permitted.

•    Submission: All three parts are due on Wednesday, October 8 in class. Late submissions will result in a grade reduction.

•    Access: All materials will be posted in the Exam folder on Course Site.

What We Have Covered

Python Basics

Introduction to Python Programming

•    Variables and Assignment Statements

•    Arithmetic

•    Function print and an Intro to Single- and Double-Quoted Strings

•    Triple-Quoted Strings

•    Getting Input from the User

Control Statements and Program Development

•    Decision Making: The if Statement and Comparison Operators

•    if…else and if…elif…else Statements

•    while Statement

•    for Statement

•    Iterables, Lists and Iterators

•    Built-In range Function

•    Augmented Assignments

•    Introduction to Formatted Strings

•    Built-In Function range: A Deeper Look

•    break and continue Statements

•    Boolean Operators and, or and not

Functions

•    Defining Functions

•    Functions with Multiple Parameters

•    import functions

•    Random-Number Generation

•    math Module Functions

Sequences: Lists and Tuples and Dictionaries

•    Lists and Tuples

•    del Statement

•    Sorting Lists

•    Searching Sequences

•    Other List Methods

•    List Comprehensions

•    Creating a Dictionary

•    Iterating through a Dictionary

•    Basic Dictionary Operations

•    Dictionary Methods keys and values

•    Dictionary Method update

Data analysis 1: DataFrame Basics

1. Creating Your Own DataFrame

o  Modifying existing data within a DataFrame. Adding new columns and rows

2. Subsetting & Filtering with DataFrame

•     Indexing and selecting data by label (.loc) and by position (.iloc)

•     Conditional filtering with multiple conditions

•     Selecting specific columns or rows

3. Handling Null Values

•     Detecting missing values with .isna() and .notna()

•     Removing null values with .dropna()

Replacing null values with .fillna() and using forward/backward fill

4. Data Merging and Concatenation

•     Merging DataFrames with merge() (inner, outer)

•     Concatenating DataFrames with concat()

5. Data Transformation and Cleaning

•     Removing duplicates with .drop_duplicates()

•     String manipulation with .str accessor (e.g., lowercase, replace)

•     Renaming columns and indexes with .rename()

6. Data Aggregation and Grouping

•     Grouping data with .groupby() and performing aggregate functions (mean, sum, etc.)

7. Descriptive Statistics and Data Analysis

•     Basic statistics (mean, median, mode, standard deviation) with .describe()

8. Time Series Data: Handling datetime data (converting to datetime, extracting year/month/day)