From 886a37ca94eae3c8ac904d1a6b736c36c2564207 Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Mon, 27 Sep 2021 21:18:14 +0100 Subject: [PATCH] updating report.py --- exploration/report.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/exploration/report.py b/exploration/report.py index ed81b47..954609c 100644 --- a/exploration/report.py +++ b/exploration/report.py @@ -1,13 +1,16 @@ -from importlib import resources +import pathlib import pandas as pd from pandas_profiling import ProfileReport def main(): - with resources.path("analyse_properties.data", "pp-complete.csv") as csv_file: + input_file = ( + pathlib.Path(__file__).parents[1] / "data" / "input" / "pp-complete.csv" + ) + with input_file.open() as csv: df_report = pd.read_csv( - csv_file, + csv, names=[ "transaction_id", "price",