Skip to content

Commit f1410a1

Browse files
Merge pull request #27 from arshitas/arshitas/remove-unused-imports
Remove unused imports
2 parents e13359f + f0603f8 commit f1410a1

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

app/etl/extract.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import pandas as pd
22
import os
33
# TODO (Find & Fix)
4-
from typing import Optional
54

65
def extract(path: str = "xyz.csv") -> pd.DataFrame :
76
"""
@@ -54,3 +53,5 @@ def extract(path: str = "xyz.csv") -> pd.DataFrame :
5453
raise ValueError("❌ File contains no data")
5554
except pd.errors.ParserError as e:
5655
raise ValueError(f"❌ Error parsing CSV: {e}")
56+
except Exception as e:
57+
raise ValueError(f"❌ Unexpected error reading file: {e}")

app/etl/load.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import sqlite3
33
import os
44
# TODO (Find & Fix)
5-
from typing import Optional
65

76
def load(df: pd.DataFrame, db_path: str = "etl_data.db", table_name: str = "processed_data"):
87
"""
@@ -68,4 +67,4 @@ def load(df: pd.DataFrame, db_path: str = "etl_data.db", table_name: str = "proc
6867
conn.rollback()
6968
finally:
7069
if conn:
71-
conn.close()
70+
conn.close()

app/etl/transform.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import pandas as pd
2-
from datetime import datetime
32
# TODO (Find & Fix)
4-
from typing import Optional
53

64
def transform(df: pd.DataFrame) -> pd.DataFrame:
75
"""
@@ -51,4 +49,4 @@ def transform(df: pd.DataFrame) -> pd.DataFrame:
5149
pass
5250

5351
# TODO (Find & Fix): Text columns are not cleaned (strip, lowercase)
54-
return df_transformed
52+
return df_transformed

0 commit comments

Comments
 (0)