Spaces:
Runtime error
Runtime error
jcmachicao
commited on
Commit
•
dca7be1
1
Parent(s):
7cf7b7b
Update app.py
Browse files
app.py
CHANGED
@@ -5,10 +5,13 @@ import pandas as pd
|
|
5 |
file = st.file_uploader('Seleccione un archivo CSV: ')
|
6 |
df = pd.read_csv(file)
|
7 |
|
8 |
-
if
|
9 |
-
|
10 |
-
|
|
|
|
|
11 |
st.write(df.head())
|
|
|
12 |
|
13 |
# Sidebar option
|
14 |
option = st.sidebar.selectbox('Clasificar resultados por:', ('Pregunta', 'Categoria'))
|
|
|
5 |
file = st.file_uploader('Seleccione un archivo CSV: ')
|
6 |
df = pd.read_csv(file)
|
7 |
|
8 |
+
if uploaded_file is not None:
|
9 |
+
# Load the Excel file into a Pandas dataframe
|
10 |
+
df = pd.read_excel(uploaded_file, engine='openpyxl', type="xlsx")
|
11 |
+
|
12 |
+
# Show the dataframe in Streamlit
|
13 |
st.write(df.head())
|
14 |
+
st.write(df.columns)
|
15 |
|
16 |
# Sidebar option
|
17 |
option = st.sidebar.selectbox('Clasificar resultados por:', ('Pregunta', 'Categoria'))
|