Automated Function (python) I am trying to create a function that automates the process of taking a CSV file, splits in the data in features and responses, apply different models (regression) to the data and score them according to some metric such as MAE, RSME, etc. Model parameter should be easily interchangeable. Here is a little of what I have so far. 

import numpy as np
import pandas as pd

def get_data(file_name):

data = pd.read_csv(file_name)

para = int(raw_input('Enter the no of parameters to be used '))
print(para)

param= []

for k in range(0,para-1):
    param[k]= raw_input('Enter the parameter')

rec = int(raw_input('Enter the no of records in the dataset '))
print(rec)
x_parameter = []
y_parameter = []
x1= []
for i in range(0,para):
    for x1[i] in data[i]:
        x_parameter[i].append(x1[i])

for j in range(0,rec):
    print x_parameter[j]
    print y_parameter[j]

get_data('C:\Users\Douglas\Desktop\trainingset.csv')

from sklearn import model_selection
from sklearn import linear_model
from sklearn import SGDRegressor
from sklearn.tree import DecisionTreeRegressor
from sklearn.neighbors import KNeighborsRegressors
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.svm import SVR

dataframe = getdata(file_name)
array = dataframe.values
X = array[]
#confirguartion for cross validation
seed = 7
#prepare models
models = []
models.append(('LR', LinearRegression()))
models.append(('SGDR', SGDRegressor()))
models.append(('KNR', KNeighborsRegressor()))
models.append(('DTR', DecisionTreeRegressor()))
models.append(('GBR', GradientBoostingRegressor()))
models.append(('SVR', SVR()))
#evaluate each model in turn
results = []
names = []
scoring = 'neg_mean_absolute_error'
for name, model in models:
    kfold = model_selection.KFold(n_splits=10, random_state=seed)
    cv_results = model_selection.cross_val_score(model, X, Y, cv=kfold, scoring=sc)
    results.append(cv_results)
    names.append(name)
    msg = "%s: %f (%f)" % (name, cv_results.mean(), cv_results.std())
    print msg
Your code looks decent, although this is not really the place to ask these types of questions. You're looking to write a wrapper around SK-Learn,

What I would try to do is to write a method to handle different types of datasets(json or csv) and then call it on a filepath and then have a function which reads in a set of models and applies each of them to the dataset in question, and finally uses metrics present in sklearn to get some results.

There is auto-sklearn which does this for you and they have a pretty solid codebase that is well documented. Here is a link for your convenience (https://automl.github.io/auto-sklearn/stable/)