Spaces:
Sleeping
Sleeping
Commit ·
155f68c
1
Parent(s): e649d13
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,7 @@ import pandas as pd
|
|
| 3 |
import os
|
| 4 |
from scipy.stats import shapiro
|
| 5 |
import numpy as np
|
|
|
|
| 6 |
|
| 7 |
col_name = st.text_input('Column to get')
|
| 8 |
col_name = str(col_name)
|
|
@@ -10,14 +11,18 @@ st.divider()
|
|
| 10 |
upload_file = st.file_uploader("Upload File")
|
| 11 |
st.divider()
|
| 12 |
|
| 13 |
-
|
| 14 |
if upload_file is not None:
|
| 15 |
df = pd.read_csv(upload_file)
|
| 16 |
data = np.array(df[col_name])
|
|
|
|
|
|
|
|
|
|
| 17 |
stat, p_val = shapiro(data)
|
| 18 |
|
| 19 |
if p_val < 0.1:
|
| 20 |
st.write("Data does not follow Normal Distribution")
|
| 21 |
else:
|
| 22 |
st.write("Data does follow Normal Distribution")
|
| 23 |
-
|
|
|
|
|
|
|
|
|
| 3 |
import os
|
| 4 |
from scipy.stats import shapiro
|
| 5 |
import numpy as np
|
| 6 |
+
import matplotlib.pyplot as plt
|
| 7 |
|
| 8 |
col_name = st.text_input('Column to get')
|
| 9 |
col_name = str(col_name)
|
|
|
|
| 11 |
upload_file = st.file_uploader("Upload File")
|
| 12 |
st.divider()
|
| 13 |
|
|
|
|
| 14 |
if upload_file is not None:
|
| 15 |
df = pd.read_csv(upload_file)
|
| 16 |
data = np.array(df[col_name])
|
| 17 |
+
#x = np.arange(0, len(data))
|
| 18 |
+
fig, ax = plt.subplots()
|
| 19 |
+
ax.hist(data, bins=100, density=True)
|
| 20 |
stat, p_val = shapiro(data)
|
| 21 |
|
| 22 |
if p_val < 0.1:
|
| 23 |
st.write("Data does not follow Normal Distribution")
|
| 24 |
else:
|
| 25 |
st.write("Data does follow Normal Distribution")
|
| 26 |
+
|
| 27 |
+
st.divider()
|
| 28 |
+
st.pyplot(fig)
|