@st.cache
def get_range(data, date_range):
    start_index = data.index[(data['date(y-m-d)'] == str(date_range[0]))].tolist()[0]
    end_index = data.index[(data['date(y-m-d)'] == str(date_range[1]))].tolist()[0]
    data = data.iloc[start_index:(end_index + 1)]
    cols = data.columns
    dates = data['date(y-m-d)']
    return (data, dates)
@st.cache
def get_range(data, date_range):
    start_index = data.index[(data['date(y-m-d)'] == str(date_range[0]))].tolist()[0]
    end_index = data.index[(data['date(y-m-d)'] == str(date_range[1]))].tolist()[0]
    data = data.iloc[start_index:(end_index + 1)]
    cols = data.columns
    dates = data['date(y-m-d)']
    return (data, dates)