Mpavan45 commited on
Commit
b0f15b9
·
verified ·
1 Parent(s): 16fea81

Update pages/4_EDA( Exploratory Data Analysis).py

Browse files
pages/4_EDA( Exploratory Data Analysis).py CHANGED
@@ -3,6 +3,8 @@ import numpy as np
3
  import pandas as pd
4
  import matplotlib.pyplot as plt
5
  import seaborn as sns
 
 
6
 
7
  st.markdown("<h1 style='text-align:center; color:blue;'>EDA(Exploratory Data Analysis)</h1>",unsafe_allow_html=True)
8
 
@@ -13,12 +15,17 @@ data= st.session_state.get("dataset")
13
  if data is not None:
14
  st.subheader("Dataset Preview:")
15
  st.write(data) # Display the first 5 rows
16
-
17
- st.subheader("Dataset Description:")
18
- st.text(data.info())
19
-
 
 
 
 
 
20
  st.subheader("Dataset Statistics:")
21
- st.write(data.discribe())
22
 
23
  st.subheader("Dataset Shape (Rows, Columns):")
24
  st.write(data.shape)
 
3
  import pandas as pd
4
  import matplotlib.pyplot as plt
5
  import seaborn as sns
6
+ from io import StringIO
7
+ import sys
8
 
9
  st.markdown("<h1 style='text-align:center; color:blue;'>EDA(Exploratory Data Analysis)</h1>",unsafe_allow_html=True)
10
 
 
15
  if data is not None:
16
  st.subheader("Dataset Preview:")
17
  st.write(data) # Display the first 5 rows
18
+
19
+ st.subheader('DataFrame Info:')
20
+ # Redirect the output of df.info() to a string buffer
21
+ buffer = StringIO()
22
+ data.info(buf=buffer)
23
+
24
+ # Display the content in Streamlit
25
+ st.text(buffer.getvalue())
26
+
27
  st.subheader("Dataset Statistics:")
28
+ st.write(data.describe())
29
 
30
  st.subheader("Dataset Shape (Rows, Columns):")
31
  st.write(data.shape)