Spaces:
No application file
No application file
File size: 519 Bytes
7df128f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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 = "./data/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}" |