Spaces:
Sleeping
Sleeping
save
Browse files- src/streamlit_app.py +15 -1
src/streamlit_app.py
CHANGED
|
@@ -2,4 +2,18 @@ import streamlit as st
|
|
| 2 |
import pandas as pd
|
| 3 |
|
| 4 |
penguin_df = pd.read_csv('src/penguins.csv')
|
| 5 |
-
st.write(penguin_df.head())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
|
| 4 |
penguin_df = pd.read_csv('src/penguins.csv')
|
| 5 |
+
st.write(penguin_df.head())
|
| 6 |
+
|
| 7 |
+
st.subheader('Penguin Species')
|
| 8 |
+
penguin_df = pd.read_csv('penguins.csv')
|
| 9 |
+
penguin_df.dropna(inplace=True)
|
| 10 |
+
output = penguin_df['species']
|
| 11 |
+
|
| 12 |
+
features = penguin_df[['island', 'bill_length_mm', 'bill_depth_mm',
|
| 13 |
+
'flipper_length_mm', 'body_mass_g', 'sex']]
|
| 14 |
+
|
| 15 |
+
features = pd.get_dummies(features)
|
| 16 |
+
st.write('Here are our output variables')
|
| 17 |
+
st.write(output.head())
|
| 18 |
+
st.write('Here are our feature variables')
|
| 19 |
+
st.write(features.head()
|