예제 #1
0
def get_target_price(start_date, end_date):
    """
    Do not fix this function
    """
    df = pd.read_csv(get_data_path('Gold'), index_col="Date", parse_dates=True, na_values=['nan'])
    df = df.applymap(lambda x : x.replace(',', '')) # 안해주면 에러남
    price = df['Price'].loc[end_date: start_date][:10][::-1].astype(float) # astype 안해주면 에러남
    return price
예제 #2
0
def get_past_price(start_date, end_date):
    """
    Do not fix this function
    """
    df = pd.read_csv(get_data_path('Gold'),
                     index_col="Date",
                     parse_dates=True,
                     na_values=['nan'])
    price = df['Price'].loc[end_date:start_date][1:11][::-1]
    return price