From b418ebe555a68eedce95976479fede33d5783249 Mon Sep 17 00:00:00 2001 From: Spencer Gerlach Date: Fri, 20 Jan 2023 22:04:45 -0800 Subject: [PATCH] feat: updated load_sample_mercedes_listings() function --- src/mercedestrenz/data.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mercedestrenz/data.py b/src/mercedestrenz/data.py index 4c1f0f0..6c85646 100644 --- a/src/mercedestrenz/data.py +++ b/src/mercedestrenz/data.py @@ -1,5 +1,5 @@ # Author: Spencer Gerlach -# Date: 2023-01-12 +# Date: 2023-01-20 from importlib import resources import pandas as pd import numpy as np @@ -16,10 +16,12 @@ def load_sample_mercedes_listings()-> pd.DataFrame(): Examples -------- - >>> from mercedestrenz.datasets import get_listings - >>> sample_mercedes_listings = get_listings() + >>> from mercedestrenz.data import load_sample_mercedes_listings + >>> sample_mercedes_listings = load_sample_mercedes_listings() """ - pass + with resources.path('mercedestrenz.datasets', 'mercedes.csv') as d: + data = pd.read_csv(d, index_col=0) + return data # Author: Kelly Wu