Import standard libaries
In [ ]:
import numpy as np
import pandas as pd
import datetime
import bokeh
todays_date = datetime.datetime.now().date()
index = pd.date_range((todays_date - datetime.timedelta(10)), periods=10, freq='D')
Import a reasonably tidy data set
In [16]:
raw_data = pd.read_csv('data.csv')
raw_columns = list(raw_data)
columns = set()
dates = list()
for column in raw_columns:
if column[0:8] == "Unnamed:":
del raw_data[column]
else:
columns.add(column.split(" ")[0])
Create a list of securities
In [17]:
columns = list(columns)
print(columns)
Create a list of dates
In [22]:
print(index)
Re-organize the data into a coherent block
In [ ]: