Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
6c8cba8
initial commit
jklinck Jan 7, 2026
7b40d01
finished week_2 assignment
jklinck Jan 7, 2026
63131b9
updated comment on question 15
jklinck Jan 7, 2026
9eca43b
updated a comment
jklinck Jan 9, 2026
ed43ba5
first commit for week2
jklinck Jan 14, 2026
6faf105
fixed name type
jklinck Jan 14, 2026
411ed8a
fixed issue with problem 10
jklinck Jan 14, 2026
23d9af1
fixed a few issues where I didn't follow directions correctly
jklinck Jan 14, 2026
f058899
fixed type on problem #2
jklinck Jan 14, 2026
8011768
fogot to save changes to typo fix on problem #2
jklinck Jan 14, 2026
39bcf65
completed first couple of problems
jklinck Jan 16, 2026
cb80c5c
finished problem 3
jklinck Jan 17, 2026
e2b5b21
finished problem 7
jklinck Jan 18, 2026
889f181
completed through problem 15
jklinck Jan 19, 2026
0e59c04
finished
jklinck Jan 19, 2026
dc217ab
initial week3 commit with new branch that is branched off of the home…
jklinck Jan 19, 2026
9fb3822
fixed a couple issues
jklinck Jan 21, 2026
3bd3577
initial commit for week4
jklinck Jan 24, 2026
2a4e5ae
completed up to problem 5
jklinck Jan 24, 2026
99c9d37
completed through problem 13
jklinck Jan 25, 2026
9511d22
finished through problem 17
jklinck Jan 26, 2026
af7655b
initial commit
jklinck Jan 27, 2026
b249419
completed week4 initial homework
jklinck Jan 27, 2026
ec10195
initial commit
jklinck Jan 29, 2026
e16b4ee
initial commit
jklinck Jan 29, 2026
7338827
started working on problem 2
jklinck Jan 30, 2026
0c2c9ea
completed problem 3
jklinck Feb 3, 2026
cb044f8
completed problem 4
jklinck Feb 3, 2026
f9e154e
completed problem 5
jklinck Feb 3, 2026
1e3890c
completed problem 6
jklinck Feb 3, 2026
af0921d
completed problem 7
jklinck Feb 3, 2026
e4047f7
mostly completed problem 9
jklinck Feb 3, 2026
592dc0e
initial commit
jklinck Feb 4, 2026
f92812c
fixed issues with problem 9
jklinck Feb 5, 2026
477eba2
fixed issue with problem 7 where I wasn not using the proper numpy fu…
jklinck Feb 5, 2026
d5e33aa
initial commit
jklinck Feb 10, 2026
e97f787
finished problem 3
jklinck Feb 12, 2026
32f3424
completed problem 5
jklinck Feb 13, 2026
7864c5b
finished problem 7
jklinck Feb 13, 2026
fa6755a
fixed comment in problem 7
jklinck Feb 13, 2026
d679a91
completed problem 8
jklinck Feb 13, 2026
a9a41eb
completed assignment
jklinck Feb 13, 2026
833ff4f
added a couple print statements for clarity
jklinck Feb 14, 2026
58e80df
created data_processing.py and started functions
jklinck Feb 18, 2026
0c213a3
completed problem #1
jklinck Feb 18, 2026
1b1ca7e
completed problem #2
jklinck Feb 18, 2026
8bcc319
started problems 4 and 5
jklinck Feb 18, 2026
a16a7b6
initial commit
jklinck Feb 18, 2026
e49da52
fixed issues in problem #1 and problem #5
jklinck Feb 18, 2026
0bef8ef
started problem 6
jklinck Feb 21, 2026
180801c
uncommented part of plot
jklinck Feb 21, 2026
aa6d72e
completed problem 6
jklinck Feb 21, 2026
c94af8f
finished problem 7
jklinck Feb 21, 2026
43a9643
initial commit
jklinck Feb 21, 2026
425e969
finished problem 1
jklinck Feb 24, 2026
c16fdb1
completed through problem 5
jklinck Feb 25, 2026
56b6fff
completed problem 6
jklinck Feb 25, 2026
f696dd2
completed problem 7
jklinck Feb 25, 2026
3aad174
finished problem 8
jklinck Feb 26, 2026
e88a92f
completed problem #9
jklinck Feb 26, 2026
88c0f29
finished comments on problem #8
jklinck Feb 26, 2026
99cc78a
fixed comment issue
jklinck Feb 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions AD450_math.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def add(num1, num2):
return num1 + num2

def multiply(num1, num2):
return num1 * num2

65 changes: 65 additions & 0 deletions data_processing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This file is used by week_7
import pandas as pd

# Problem 1
def rename_columns(df_raw):
"""
Convert blank spaces to _
Convert everything into lower case
Remove trailing and leading spaces
Return a new DataFrame object

I noticed you need to use strip() before replace otherwise it would replace any
leading or trailing spaces with a _
"""
df_raw.rename(columns={"original_titlê":"original_title", "Genrë¨":"genre", "Unnamed:_8":"unnamed_8"}, inplace=True)
df_raw.columns = df_raw.columns.str.strip()
df_raw.columns = df_raw.columns.str.replace(' ', '_')
df_raw.columns = df_raw.columns.str.lower()
return df_raw

# Problem #2
def remove_fully_null_columns_rows(df_raw):
"""
Remove rows that are completely null
Remove columns that are completely null
Return a new DataFrame object
"""
df_raw = df_raw.dropna(how="all")
df_raw = df_raw.dropna(axis="columns", how="all")
return df_raw

# Problem #3
def clean_and_fill_content_rating(df_raw):
"""
Convert all NaN values in content_rating to "Unrated"
Convert all "Not Rated" with "Unrated"
Return a new DataFrame object
"""
df_raw.loc[df_raw["content_rating"].isnull(), "content_rating"] = "Unrated"
df_raw.loc[df_raw["content_rating"] == "Not Rated", "content_rating"] = "Unrated"
return df_raw

# Problem #4
def clean_release_year(df_raw):
"""
Add new column "release_year_coerce", use pd.to_datetime with errors="coerce"
Add new column "release_year_mixed", use pd.to_datetime with errors="coerce" and format="mixed"
Return a new DataFrame object
"""
df_raw["release_year_coerce"] = pd.to_datetime(df_raw["release_year"], errors="coerce")
df_raw["release_year_mixed"] = pd.to_datetime(df_raw["release_year"], errors="coerce", format="mixed", dayfirst=True)
return df_raw

# Problem #5
def clean_income(df_raw):
"""
Remove $, commas and other issues and covert to an int
Return a new DataFrame object
"""
df_raw["income"] = df_raw["income"].str.replace(r'[$,]','', regex=True)
df_raw["income"] = df_raw["income"].str.replace('o', '0', regex=False)
df_raw["income"] = df_raw["income"].astype("Int64")
return df_raw


Loading