diff trafficintelligence/storage.py @ 1131:3972d85e3b6c

work on loading data for sumo
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 20 Feb 2020 23:56:56 -0500
parents e53c6e87bb3f
children c4d9c270f999
line wrap: on
line diff
--- a/trafficintelligence/storage.py	Tue Feb 11 03:47:05 2020 +0000
+++ b/trafficintelligence/storage.py	Thu Feb 20 23:56:56 2020 -0500
@@ -945,6 +945,13 @@
 # txt files
 #########################
 
+def loadCSVs(filenames, **kwargs):
+    '''Loads all the data from the filenames (eg from glob) and returns a concatenated dataframe'''
+    data = read_csv(filenames[0], **kwargs)
+    for f in filenames[1:]:
+        data = data.append(read_csv(filenames[0], **kwargs))
+    return data
+
 def saveList(filename, l):
     f = utils.openCheck(filename, 'w')
     for x in l: