@@ -191,7 +191,7 @@ def _run_interface(self, runtime):
191191 columns = ['trans_x' , 'trans_y' , 'trans_z' , 'rot_x' , 'rot_y' , 'rot_z' ],
192192 )
193193
194- params .to_csv (self ._results ['out_file' ], sep = '\t ' , index = False )
194+ params .to_csv (self ._results ['out_file' ], sep = '\t ' , index = False , na_rep = 'n/a' )
195195
196196 return runtime
197197
@@ -224,7 +224,7 @@ def _run_interface(self, runtime):
224224
225225 fd = pd .DataFrame (diff .abs ().sum (axis = 1 , skipna = False ), columns = ['FramewiseDisplacement' ])
226226
227- fd .to_csv (self ._results ['out_file' ], sep = '\t ' , index = False )
227+ fd .to_csv (self ._results ['out_file' ], sep = '\t ' , index = False , na_rep = 'n/a' )
228228
229229 return runtime
230230
@@ -252,7 +252,9 @@ def _run_interface(self, runtime):
252252 )
253253
254254 metadata = pd .read_csv (self .inputs .in_file , sep = '\t ' )
255- metadata [metadata .retained ].to_csv (self ._results ['out_file' ], sep = '\t ' , index = False )
255+ metadata [metadata .retained ].to_csv (
256+ self ._results ['out_file' ], sep = '\t ' , index = False , na_rep = 'n/a'
257+ )
256258
257259 return runtime
258260
@@ -315,13 +317,15 @@ def _run_interface(self, runtime):
315317 final_components = components .rename (columns = dict (zip (c_orig , c_new , strict = False )))
316318 final_components .rename (columns = dict (zip (w_orig , w_new , strict = False )), inplace = True )
317319 final_components .rename (columns = dict (zip (a_orig , a_new , strict = False )), inplace = True )
318- final_components .to_csv (self ._results ['components_file' ], sep = '\t ' , index = False )
320+ final_components .to_csv (
321+ self ._results ['components_file' ], sep = '\t ' , index = False , na_rep = 'n/a'
322+ )
319323
320324 metadata .loc [c_comp_cor .index , 'component' ] = c_new
321325 metadata .loc [w_comp_cor .index , 'component' ] = w_new
322326 metadata .loc [a_comp_cor .index , 'component' ] = a_new
323327
324- metadata .to_csv (self ._results ['metadata_file' ], sep = '\t ' , index = False )
328+ metadata .to_csv (self ._results ['metadata_file' ], sep = '\t ' , index = False , na_rep = 'n/a' )
325329
326330 return runtime
327331
0 commit comments