From 0b4498869e3c26e4951713971c594c18e24a1ede Mon Sep 17 00:00:00 2001 From: Thomas Churchman Date: Wed, 1 Apr 2020 22:51:06 +0200 Subject: [PATCH] Fix issue with parsing csv headers in the plotter. --- plotter/plot_on_map.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plotter/plot_on_map.py b/plotter/plot_on_map.py index c02579f9..8101a2d1 100644 --- a/plotter/plot_on_map.py +++ b/plotter/plot_on_map.py @@ -62,14 +62,11 @@ def split_episodes(meas_file): """ f = open(meas_file, "rU") header_details = f.readline() - - header_details = header_details.split(',') - header_details[-1] = header_details[-1][:-2] + header_details = [s.strip() for s in header_details.split(',')] f.close() print (header_details) - details_matrix = np.loadtxt(open(meas_file, "rb"), delimiter=",", skiprows=1) # @@ -122,9 +119,7 @@ def get_causes_of_end(summary_file): """ f = open(summary_file, "rU") header_summary = f.readline() - - header_summary = header_summary.split(',') - header_summary[-1] = header_summary[-1][:-2] + header_summary = [s.strip() for s in header_summary.split(',')] f.close() summary_matrix = np.loadtxt(open(summary_file, "rb"), delimiter=",", skiprows=1)