file_io.file_output

Utility functions for writing data from our internal representation of numpy structured arrays to output files.

Functions

write_csv(data, filepath[, move_columns])

Write a numpy structured array to a CSV file.

write_hdf5(data, filepath[, key])

Write a numpy structured array to an HDF5 file.

Module Contents

write_csv(data, filepath, move_columns=None)[source]

Write a numpy structured array to a CSV file.

Parameters:
  • data (numpy structured array) – The data to write to the file.

  • filepath (str) – The path to the file to write.

  • move_columns (dict, optional) – Dict of any column names that need moved, paired with their new position.

write_hdf5(data, filepath, key='data')[source]

Write a numpy structured array to an HDF5 file.

Parameters:
  • data (numpy structured array) – The data to write to the file.

  • filepath (str) – The path to the file to write.

  • key (str, optional) – The key to use in the HDF5 file.