act.io.read_csv#

act.io.read_csv(filename, sep=',', engine='python', column_names=None, skipfooter=0, ignore_index=True, **kwargs)[source]#

Returns an xarray.Dataset with stored data and metadata from user-defined query of CSV files.

Parameters:
  • filenames (str or list) – Name of file(s) to read.

  • sep (str) – The separator between columns in the csv file.

  • column_names (list or None) – The list of column names in the csv file.

  • verbose (bool) – If true, will print if a file is not found.

  • ignore_index (bool) – Keyword for pandas concat function. If True, do not use the index values along the concatenation axis. The resulting axis will be labeled 0, …, n - 1. This is useful if you are concatenating datasets where the concatenation axis does not have meaningful indexing information. Note the index values on the other axes are still respected in the join.

  • Additional keyword arguments will be passed into pandas.read_csv.

Returns:

ds (xarray.Dataset) – ACT Xarray dataset. Will be None if the file is not found.

Examples

This example will load the example sounding data used for unit testing:

import act

ds = act.io.csv.read(act.tests.sample_files.EXAMPLE_CSV_WILDCARD)