superscript.py - v 1.0.2.000

changelog:
- added data reading from folder
- nearly crashed computer reading from 20 GiB of data
This commit is contained in:
ltcptgeneral 2019-02-19 09:44:51 -06:00
parent 0249962ac2
commit 1e76b650ea
6 changed files with 19 additions and 2 deletions

View File

@ -411,6 +411,7 @@ class objectives:
def load_csv(filepath): def load_csv(filepath):
with open(filepath, newline = '') as csvfile: with open(filepath, newline = '') as csvfile:
file_array = list(csv.reader(csvfile)) file_array = list(csv.reader(csvfile))
csvfile.close()
return file_array 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 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

View File

@ -0,0 +1,2 @@
1,2,3
4,5,6
1 1 2 3
2 4 5 6

View File

@ -4,9 +4,12 @@
#Notes: #Notes:
#setup: #setup:
__version__ = "1.0.1.000" __version__ = "1.0.2.000"
__changelog__ = """changelog: __changelog__ = """changelog:
1.0.2.000:
- added data reading from folder
- nearly crashed computer reading from 20 GiB of data
1.0.1.000: 1.0.1.000:
- added data reading from file - added data reading from file
- added superstructure to code - added superstructure to code
@ -22,5 +25,16 @@ __author__ = (
import analysis import analysis
import titanlearn import titanlearn
import visualization import visualization
import os
import glob
data = analysis.load_csv("data/data.csv") #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)