diff --git a/data analysis/__pycache__/analysis.cpython-37.pyc b/data analysis/__pycache__/analysis.cpython-37.pyc index b9e6f345..e4e72e41 100644 Binary files a/data analysis/__pycache__/analysis.cpython-37.pyc and b/data analysis/__pycache__/analysis.cpython-37.pyc differ diff --git a/data analysis/__pycache__/titanlearn.cpython-37.pyc b/data analysis/__pycache__/titanlearn.cpython-37.pyc index 4bc942f5..534544d2 100644 Binary files a/data analysis/__pycache__/titanlearn.cpython-37.pyc and b/data analysis/__pycache__/titanlearn.cpython-37.pyc differ diff --git a/data analysis/__pycache__/visualization.cpython-37.pyc b/data analysis/__pycache__/visualization.cpython-37.pyc index cdbce53b..14d8a833 100644 Binary files a/data analysis/__pycache__/visualization.cpython-37.pyc and b/data analysis/__pycache__/visualization.cpython-37.pyc differ diff --git a/data analysis/analysis.py b/data analysis/analysis.py index 6fc315a3..fbafcf7c 100644 --- a/data analysis/analysis.py +++ b/data analysis/analysis.py @@ -411,6 +411,7 @@ class objectives: def load_csv(filepath): with open(filepath, newline = '') as csvfile: file_array = list(csv.reader(csvfile)) + csvfile.close() return file_array def basic_stats(data, method, arg): # data=array, mode = ['1d':1d_basic_stats, 'column':c_basic_stats, 'row':r_basic_stats], arg for mode 1 or mode 2 for column or row diff --git a/data analysis/data/dicc.csv b/data analysis/data/dicc.csv new file mode 100644 index 00000000..da813b68 --- /dev/null +++ b/data analysis/data/dicc.csv @@ -0,0 +1,2 @@ +1,2,3 +4,5,6 diff --git a/data analysis/superscript.py b/data analysis/superscript.py index 2e7c1fd1..0690ef10 100644 --- a/data analysis/superscript.py +++ b/data analysis/superscript.py @@ -4,9 +4,12 @@ #Notes: #setup: -__version__ = "1.0.1.000" +__version__ = "1.0.2.000" __changelog__ = """changelog: +1.0.2.000: + - added data reading from folder + - nearly crashed computer reading from 20 GiB of data 1.0.1.000: - added data reading from file - added superstructure to code @@ -22,5 +25,16 @@ __author__ = ( import analysis import titanlearn import visualization +import os +import glob -data = analysis.load_csv("data/data.csv") \ No newline at end of file +#get all the data +source_dir = 'data' +file_list = glob.glob(source_dir + '/*.CSV') +data = [] +for file_path in file_list: + data.append(analysis.load_csv(file_path)) + +#unhelpful comment +#for d in data: +# print (d) \ No newline at end of file