I've been trying to integrate this script into the bot, however I am missing a csv file. I vaguely recall an earlier version of this bot using .accdb files @yasinkuyu if this is right, I'd love to get those for this script to work.
import csv
import numpy
import sklearn.svm
from sklear.svm import SVR
import matploitlib.pyplot as plt
dates = []
prices = []
def get_name(filename):
with open(filename, 'r') as csvfile:
next(csvFileReader)
for row in csvFileReader:
dates.append(int(row[0].split('-')[0]))
priices.append(float(row[1]))
return
def predict_prices(dates, prices, x):
dates = np.reshape(dates, (len(dates), 1))
I've been trying to integrate this script into the bot, however I am missing a csv file. I vaguely recall an earlier version of this bot using .accdb files @yasinkuyu if this is right, I'd love to get those for this script to work.
import csv import numpy import sklearn.svm from sklear.svm import SVR import matploitlib.pyplot as plt
dates = [] prices = []
def get_name(filename): with open(filename, 'r') as csvfile: next(csvFileReader) for row in csvFileReader: dates.append(int(row[0].split('-')[0])) priices.append(float(row[1])) return def predict_prices(dates, prices, x): dates = np.reshape(dates, (len(dates), 1))
get_data('aapl.csv')
predicted_price(predict_price(dates, prices, 29))
print(predicted_price)