Spaces:
Sleeping
Sleeping
Update pages/5_Structured_data.py
Browse files- pages/5_Structured_data.py +17 -1
pages/5_Structured_data.py
CHANGED
|
@@ -79,4 +79,20 @@ st.subheader("How to read a Exel file?")
|
|
| 79 |
rcode='''
|
| 80 |
pd.read_excel(r"/Users/rajbunny/Downloads/FSI-2023-DOWNLOAD.xlsx")
|
| 81 |
'''
|
| 82 |
-
st.code(rcode,language="python")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
rcode='''
|
| 80 |
pd.read_excel(r"/Users/rajbunny/Downloads/FSI-2023-DOWNLOAD.xlsx")
|
| 81 |
'''
|
| 82 |
+
st.code(rcode,language="python")
|
| 83 |
+
st.subheader("How to read a Exel file having mutiple sheets?")
|
| 84 |
+
mcode='''
|
| 85 |
+
df = pd.read_excel(r"/Users/rajbunny/Downloads/Book3.xlsx", sheet_name=[0, 1, 2])
|
| 86 |
+
'''
|
| 87 |
+
st.code(mcode,language="python")
|
| 88 |
+
st.subheader("How to save data frame back to exel?")
|
| 89 |
+
scode='''
|
| 90 |
+
with pd.ExcelWriter(r'/Users/rajbunny/Downloads/untitled_folder.xlsx', mode="x") as f2:
|
| 91 |
+
df[0].to_excel(f2, sheet_name='student_info')
|
| 92 |
+
df[1].to_excel(f2, sheet_name='sem1')
|
| 93 |
+
df[2].to_excel(f2, sheet_name='sem2')
|
| 94 |
+
'''
|
| 95 |
+
st.code(scode,language="python")
|
| 96 |
+
st.suheader("To check coding part of exel.ipynb")
|
| 97 |
+
if st.button("Click_here"):
|
| 98 |
+
st.write(f"click_here to go{'http://localhost:8888/notebooks/exel.ipynb'}")
|