This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import yfinance as yf | |
import streamlit as st | |
st.write(""" | |
# Simple Stock Price App | |
Shown are the stock closing price and volume of Google! | |
""") | |
# https://towardsdatascience.com/how-to-get-stock-data-using-python-c0de1df17e75 | |
#define the ticker symbol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import yfinance as yf | |
import streamlit as st | |
st.write(""" | |
# Simple Stock Price App | |
Shown are the stock **closing price** and ***volume*** of Google! | |
""") | |
# https://towardsdatascience.com/how-to-get-stock-data-using-python-c0de1df17e75 | |
#define the ticker symbol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
import pandas as pd | |
from sklearn import datasets | |
from sklearn.ensemble import RandomForestClassifier | |
st.write(""" | |
# Simple Iris Flower Prediction App | |
This app predicts the **Iris flower** type! | |
""") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
import pandas as pd | |
import numpy as np | |
import pickle | |
from sklearn.ensemble import RandomForestClassifier | |
st.write(""" | |
# Penguin Prediction App | |
This app predicts the **Palmer Penguin** species! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
penguins = pd.read_csv('penguins_cleaned.csv') | |
# Ordinal feature encoding | |
# https://www.kaggle.com/pratik1120/penguin-dataset-eda-classification-and-clustering | |
df = penguins.copy() | |
target = 'species' | |
encode = ['sex','island'] | |
for col in encode: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
species | island | bill_length_mm | bill_depth_mm | flipper_length_mm | body_mass_g | sex | |
---|---|---|---|---|---|---|---|
Adelie | Torgersen | 39.1 | 18.7 | 181 | 3750 | male | |
Adelie | Torgersen | 39.5 | 17.4 | 186 | 3800 | female | |
Adelie | Torgersen | 40.3 | 18 | 195 | 3250 | female | |
Gentoo | Biscoe | 46.1 | 13.2 | 211 | 4500 | female | |
Gentoo | Biscoe | 50 | 16.3 | 230 | 5700 | male | |
Gentoo | Biscoe | 48.7 | 14.1 | 210 | 4450 | female | |
Chinstrap | Dream | 46.5 | 17.9 | 192 | 3500 | female | |
Chinstrap | Dream | 50 | 19.5 | 196 | 3900 | male | |
Chinstrap | Dream | 51.3 | 19.2 | 193 | 3650 | male |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
island | ||
---|---|---|
Biscoe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
island_Biscoe | ||
---|---|---|
1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
island | ||
---|---|---|
Biscoe | ||
Dream | ||
Torgersen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
island_Biscoe | island_Dream | island_Torgersen | |
---|---|---|---|
1 | 0 | 0 | |
0 | 1 | 0 | |
0 | 0 | 1 |
OlderNewer