code: def write_tabular(obj, filepath):
      
      _, fn, ext = splitext2(filepath)
      if ext == '.h5':
          _write_tabular_h5(obj, filepath)
      elif ext == '.pkl':
          _write_tabular_pickle(obj, filepath)
      else:
          raise NotImplementedError
docs: Write tabular object in HDF5 or pickle format
  
      Args:
          obj (array or DataFrame): tabular object to write
          filepath (path-like): path to write to; must end in '.h5' or '.pkl'