LakshmiHarika commited on
Commit
a739a30
·
verified ·
1 Parent(s): 70118e5

Update pages/Data Collection.py

Browse files
Files changed (1) hide show
  1. pages/Data Collection.py +57 -4
pages/Data Collection.py CHANGED
@@ -1819,7 +1819,7 @@ elif st.session_state.current_page == "explore_text":
1819
 
1820
  elif st.session_state.current_page == "explore_csv":
1821
  st.markdown("""
1822
- <h3 style="color: #BB3385;">Comma-Separated Values(CSV)</h3>
1823
  """, unsafe_allow_html=True)
1824
 
1825
  st.write("""
@@ -1981,7 +1981,7 @@ elif st.session_state.current_page == "explore_json":
1981
 
1982
  elif st.session_state.current_page == "explore_xml":
1983
  st.markdown("""
1984
- <h3 style="color: #BB3385;">Extensible Markup Language(XML)</h3>
1985
  """, unsafe_allow_html=True)
1986
 
1987
  st.write("""
@@ -2115,10 +2115,63 @@ elif st.session_state.current_page == "explore_xml":
2115
 
2116
  elif st.session_state.current_page == "explore_html":
2117
  st.markdown("""
2118
- <h3 style="color: #e25822;">Exploring HTML</h3>
2119
  """, unsafe_allow_html=True)
 
2120
  st.write("""
2121
- HTML structures web pages using elements like <div> and <p>.
 
 
 
 
 
2122
  """)
2123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2124
 
 
1819
 
1820
  elif st.session_state.current_page == "explore_csv":
1821
  st.markdown("""
1822
+ <h2 style="color: #BB3385;">Comma-Separated Values(CSV)</h2>
1823
  """, unsafe_allow_html=True)
1824
 
1825
  st.write("""
 
1981
 
1982
  elif st.session_state.current_page == "explore_xml":
1983
  st.markdown("""
1984
+ <h2 style="color: #BB3385;">Extensible Markup Language(XML)</h2>
1985
  """, unsafe_allow_html=True)
1986
 
1987
  st.write("""
 
2115
 
2116
  elif st.session_state.current_page == "explore_html":
2117
  st.markdown("""
2118
+ <h2 style="color: #BB3385;">Hyper Text Markup Language (HTML)</h2>
2119
  """, unsafe_allow_html=True)
2120
+
2121
  st.write("""
2122
+ - **HTML (HyperText Markup Language)** is the standard language used to create and structure web pages.
2123
+ - It uses a combination of elements (tags) to define the content and layout of a webpage.
2124
+ - Key features include:
2125
+ - Structuring text with headings, paragraphs, and lists.
2126
+ - Embedding multimedia content like images, videos, and audio.
2127
+ - Adding interactivity with forms and hyperlinks.
2128
  """)
2129
 
2130
+ st.markdown("""
2131
+ <h3 style="color: #5b2c6f;">Basic HTML Structure</h3>
2132
+ """, unsafe_allow_html=True)
2133
+
2134
+ st.code("""
2135
+ <!DOCTYPE html>
2136
+ <html>
2137
+ <head>
2138
+ <title>Sample HTML</title>
2139
+ </head>
2140
+ <body>
2141
+ <h1>Welcome to HTML</h1>
2142
+ <p>This is a paragraph.</p>
2143
+ </body>
2144
+ </html>
2145
+ """, language="html")
2146
+
2147
+ st.markdown("""
2148
+ <h3 style="color: #5b2c6f;">Reading HTML Files</h3>
2149
+ """, unsafe_allow_html=True)
2150
+
2151
+ st.code("""
2152
+
2153
+ # Reading an HTML file into a DataFrame
2154
+ dfs = pd.read_html('sample.html') # Returns a list of DataFrames
2155
+ for df in dfs:
2156
+ print(df)
2157
+ """, language="python")
2158
+
2159
+ st.markdown("""
2160
+ <h3 style="color: #5b2c6f;">Writing HTML Files</h3>
2161
+ """, unsafe_allow_html=True)
2162
+
2163
+ st.code("""
2164
+
2165
+ # Sample DataFrame
2166
+ data = pd.DataFrame({
2167
+ 'name': ['John', 'Jane', 'Doe'],
2168
+ 'age': [28, 34, 29],
2169
+ 'department': ['HR', 'IT', 'Finance']
2170
+ })
2171
+
2172
+ # Write the DataFrame to an HTML file
2173
+ data.to_html('output.html', index=False)
2174
+ """, language="python")
2175
+
2176
+
2177