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
# Add days of the week | |
msft_proc['day_of_week'] = msft_proc['timestamp'].dt.day_name() | |
# create dummy variables | |
dummies = pd.get_dummies(msft_proc['day_of_week']) | |
# drop original days of the week column from the original dataframe | |
msft_proc.drop(columns=['day_of_week'], inplace=True) | |
# add two dataframes together |
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 data from '01_raw' data folder into the processing notebook | |
msft_proc = pd.read_csv('../data/01_raw/msft_raw.csv', parse_dates=['timestamp']) | |
# Let's take a look at our dataset | |
msft_proc.head() |
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
# this blog of code allows me to import my secrets file from the conf folder in my | |
# current jupyter notebook | |
root_dir = os.path.join(os.getcwd(), '..') | |
sys.path.append(root_dir) | |
from conf import secrets | |
# Download data as CSV from API | |
function = 'TIME_SERIES_DAILY_ADJUSTED' | |
symbol = 'MSFT' |
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
# read in libraries | |
import os | |
import sys | |
import pandas as pd | |
import requests | |
from iexfinance.stocks import Stock | |
from iexfinance.refdata import get_symbols | |
root_dir = os.path.join(os.getcwd(), '..') |
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
family_members = ['Misha', 'Kisha', 'Drew'] | |
family_member.lower() |
NewerOlder