import pandas as pd def disease_info(disease_index): df = pd.read_excel(r"disease_info.xlsx") df = df[df["Disease"] == disease_index].iloc[0] html_text = "" html_text += "

Diagnosis

\n" + "

" + str(df["Diagnosis"]) + "

" + "

" html_text += "

Cause

\n" + "

" + str(df["Cause"]) + "

" + "

" html_text += "

Symptoms

\n" + "

" + str(df["Symptoms"]) + "

" + "

" html_text += "

Treatment

\n" + "

" + str(df["Treatment"]) + "

" + "

" return html_text