{"cells":[{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"890c8f77-4210-e028-e639-4a9bf9dc033d"},"outputs":[],"source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load in \n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport csv as csv\n# Input data files are available in the \"../input/\" directory.\n# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory\n\nfrom subprocess import check_output\nprint(check_output([\"ls\", \"../input\"]).decode(\"utf8\"))\n\n# Any results you write to the current directory are saved as output."},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"7dd799cd-1137-da5b-297b-63f760183a17"},"outputs":[],"source":"import csv as csv \nimport numpy as np\n\ncsv_file_object = csv.reader(open('../train.csv', 'rb')) \nheader = csv_file_object.next()  # The next() command just skips the \n                                 # first line which is a header\ndata=[]                          # Create a variable called 'data'.\nfor row in csv_file_object:      # Run through each row in the csv file,\n    data.append(row)             # adding each row to the data variable\ndata = np.array(data)            # Then convert from a list to an arr\n                                 # Be aware that each item is currently\n                                 # a string in this format\n#print str(data[0:10])\ndata"}],"metadata":{"_change_revision":0,"_is_fork":false,"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.5.2"}},"nbformat":4,"nbformat_minor":0}