Skip to content
Merged
Changes from all commits
Commits
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
7 changes: 5 additions & 2 deletions app/etl/extract.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import pandas as pd
import os
# TODO (Find & Fix)

def extract(path: str = "xyz.csv") -> pd.DataFrame :
# Get the base directory (app/) relative to this file (app/etl/extract.py)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEFAULT_DATA_PATH = os.path.join(BASE_DIR, "data.csv")

def extract(path: str = DEFAULT_DATA_PATH) -> pd.DataFrame :
"""
Extracts data from CSV, Excel, or JSON file.

Expand Down
Loading