yamunasivan's picture
add new project
c70f5cd
raw
history blame contribute delete
514 Bytes
import pandas as pd
import os
import sys
src_directory = os.path.abspath(os.path.join(os.path.dirname(__file__), "../..", "backend"))
sys.path.append(src_directory)
from utils import logger
file_path = "./world_population.csv"
def process_data():
try:
logger.log("Trying to read the file")
df = pd.read_csv(file_path)
logger.log("Successfully read file")
return df
except Exception as e:
logger.log("Unable to read the file")
f"Unable to read the file {e}"