python script to read in .csv file containing quaternion coordinates and turn it into a path/curve for an object to follow
Your data was rather ugly, but I was able to write code that copes with the extra commas and spaces:

From http://www.purplefrog.com/~thoth/blender/python-cookbook/csv-to-fcurve-loc-rot.html :

Here's an updated version that handles the situation where the location and quaternion .CSV files do not have the same number of lines.  This opens up more questions about why they differ.  Are they different sample rates or different time spans or both?

import bpy
import csv

def keyframe_location(obj, fname):
    with open(fname, 'r') as loc_fh:
        r_loc = csv.reader(loc_fh, delimiter=',')
        i = 0
        for row_loc in r_loc:
            row_loc = [ float(x.strip()) for x in row_loc[:3]]
            fr = 10+2*i
            obj.location = row_loc
            obj.keyframe_insert(data_path="location", frame=fr)

            i = i+1


def keyframe_rotation(obj, fname):
    with open(fname, 'r') as quat_fh:
        r_quat = csv.reader(quat_fh, delimiter=',')
        i = 0
        obj.rotation_mode = 'QUATERNION'
        for row_quat in r_quat:
            row_quat = [ float(x.strip()) for x in row_quat[:4]]
            fr = 10+2*i
            obj.rotation_quaternion = row_quat
            obj.keyframe_insert(data_path="rotation_quaternion", frame=fr)

            i = i+1


def mission2(obj, loc_csv, quat_csv):
    """
     Use this version if the loc and quat .CSV files do not have the same number of lines.
     This opens up the question: why do they have differing numbers of lines?
     Are they covering the same time span at different frame rates, or do they cover different time spans?
    """
    keyframe_location(obj, loc_csv)
    keyframe_rotation(obj, quat_csv)


#
#

mission2(bpy.context.active_object, '/var/tmp/loc.txt', "/var/tmp/quat.txt")