这是我的代码使用streamlit
def main():
st.title(
'Aplikasi Forecasting Exchange Rate')
def file_selector(folder_path='./datasets'):
filenames = os.listdir(folder_path)
selected_filename = st.selectbox("Select A file", filenames)
return os.path.join(folder_path, selected_filename)
filename = file_selector()
st.info("Kamu memilih {}".format(filename))
# Read Data
dateparse = lambda dates: pd.datetime.strptime(dates,'%d-%m-%y')
akhir = pd.read_csv(filename, index_col=[0], date_parser=dateparse)
akhir['Terakhir'] = akhir['Terakhir'].str.replace(',', '').astype(float)
# Show Dataset
if st.checkbox("Show Dataset"):
number = st.number_input("Number of Rows to View")
st.dataframe(akhir.head(number))
当我想显示数据集 TypeError: cannot do slice indexing on with these indexers [0.0] of