parameters: (fname, frames, preproc)
return_statement: return result
docstring: Write data to csv file
docstring_summary: Write data to csv file
docstring_tokens: Write data to csv file
function: def write_data_csv(fname, frames, preproc):
     """Write data to csv file"""
     fdata = open(fname, "w")
     dr = Parallel()(delayed(get_data)(lst,preproc) for lst in frames)
     data,result = zip(*dr)
     for entry in data:
        fdata.write(','.join(entry)+'\r\n')
     print("All finished, %d slices in total" % len(data))
     fdata.close()
     result = np.ravel(result)
     return result
function_tokens: def write_data_csv ( fname , frames , preproc ) : fdata = open ( fname , "w" ) dr = Parallel ( ) ( delayed ( get_data ) ( lst , preproc ) for lst in frames ) data , result = zip ( * dr ) for entry in data : fdata . write ( ',' . join ( entry ) + '\r\n' ) print ( "All finished, %d slices in total" % len ( data ) ) fdata . close ( ) result = np . ravel ( result ) return result