Skip to content

Instantly share code, notes, and snippets.

View mberrien-fitzsimons's full-sized avatar
:electron:

Markisha Berrien-Fitzsimons mberrien-fitzsimons

:electron:
View GitHub Profile
# 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
# 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 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'
# 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(), '..')
family_members = ['Misha', 'Kisha', 'Drew']
family_member.lower()