Spaces:
Sleeping
Sleeping
Update pages/Data Collection.py
Browse files- pages/Data Collection.py +23 -1
pages/Data Collection.py
CHANGED
|
@@ -130,7 +130,29 @@ if data_type == "Structured Data":
|
|
| 130 |
|
| 131 |
with col1:
|
| 132 |
if st.button("Explore Excel"):
|
| 133 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
|
| 135 |
elif data_type == "Unstructured Data":
|
| 136 |
st.markdown("""
|
|
|
|
| 130 |
|
| 131 |
with col1:
|
| 132 |
if st.button("Explore Excel"):
|
| 133 |
+
st.markdown("""
|
| 134 |
+
<div style="text-align: left; margin-top: 20px;">
|
| 135 |
+
<h3 style="color: #e25822;">Exploring Excel</h3>
|
| 136 |
+
</div>
|
| 137 |
+
""", unsafe_allow_html=True)
|
| 138 |
+
|
| 139 |
+
st.write("""
|
| 140 |
+
Excel is one of the most widely used tools for handling structured data. It supports features like:
|
| 141 |
+
- Tabular data representation.
|
| 142 |
+
- Complex computations using formulas.
|
| 143 |
+
- Data visualization with charts and graphs.
|
| 144 |
+
""")
|
| 145 |
+
|
| 146 |
+
# Add Excel file uploader and display content
|
| 147 |
+
uploaded_file = st.file_uploader("Upload an Excel file", type=["xlsx", "xls"])
|
| 148 |
+
if uploaded_file:
|
| 149 |
+
try:
|
| 150 |
+
df = pd.read_excel(uploaded_file)
|
| 151 |
+
st.write("Preview of the uploaded file:")
|
| 152 |
+
st.dataframe(df)
|
| 153 |
+
except Exception as e:
|
| 154 |
+
st.error("An error occurred while reading the file. Please ensure it is a valid Excel file.")
|
| 155 |
+
|
| 156 |
|
| 157 |
elif data_type == "Unstructured Data":
|
| 158 |
st.markdown("""
|