Source code for mercedestrenz.data

# Author: Spencer Gerlach
# Date: 2023-01-20
from importlib import resources
import pandas as pd
import numpy as np

[docs]def load_sample_mercedes_listings()-> pd.DataFrame(): """ Retrieves a dataframe containing sample data of used Mercedez Benz vehicles. The function returns a pandas dataframe of all sample listings. Returns ------- pandas.DataFrame A pandas dataframe of all listings contained in the package's sample data. Examples -------- >>> from mercedestrenz.data import load_sample_mercedes_listings >>> sample_mercedes_listings = load_sample_mercedes_listings() """ with resources.path('mercedestrenz.datasets', 'mercedes.csv') as d: data = pd.read_csv(d, index_col=0) return data
# Author: Kelly Wu # Date: 2023-01-19