Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ from math import ceil
|
|
13 |
def split_frame(input_df, rows):
|
14 |
df=[]
|
15 |
for i in range(0, len(input_df), rows):
|
16 |
-
df.append (input_df.iloc[i : i + rows
|
17 |
return df
|
18 |
|
19 |
def paginar_frame(df):
|
@@ -140,16 +140,17 @@ def main():
|
|
140 |
df_results=detalles_resultados(df,result)
|
141 |
batch_size = 5
|
142 |
pages = split_frame(df_results, batch_size)
|
143 |
-
|
|
|
|
|
144 |
with bottom_menu[1]:
|
145 |
total_pages = (ceil(len(df_results) / batch_size) if ceil(len(df_results) / batch_size) > 0 else 1)
|
146 |
current_page = st.number_input("Página", min_value=1, max_value=total_pages, step=1)
|
147 |
|
148 |
with bottom_menu[0]:
|
149 |
-
|
150 |
st.markdown(f"Página **{current_page}** de **{total_pages}** ")
|
151 |
|
152 |
-
|
153 |
|
154 |
|
155 |
if __name__ == "__main__":
|
|
|
13 |
def split_frame(input_df, rows):
|
14 |
df=[]
|
15 |
for i in range(0, len(input_df), rows):
|
16 |
+
df.append (input_df.iloc[i : i + rows, :])
|
17 |
return df
|
18 |
|
19 |
def paginar_frame(df):
|
|
|
140 |
df_results=detalles_resultados(df,result)
|
141 |
batch_size = 5
|
142 |
pages = split_frame(df_results, batch_size)
|
143 |
+
paginar_frame(pages[current_page - 1])
|
144 |
+
|
145 |
+
bottom_menu = st.columns((2))
|
146 |
with bottom_menu[1]:
|
147 |
total_pages = (ceil(len(df_results) / batch_size) if ceil(len(df_results) / batch_size) > 0 else 1)
|
148 |
current_page = st.number_input("Página", min_value=1, max_value=total_pages, step=1)
|
149 |
|
150 |
with bottom_menu[0]:
|
|
|
151 |
st.markdown(f"Página **{current_page}** de **{total_pages}** ")
|
152 |
|
153 |
+
|
154 |
|
155 |
|
156 |
if __name__ == "__main__":
|