viscid.dataset module

test docstring

viscid.dataset.to_dataframe(collection, fld_names=None, selection=Ellipsis, time_sel=slice(None, None, None), time_col='time', datetime_col='datetime')[source]

Consolidate field collection into pandas dataframe

Parameters:
  • collection (sequence) – Can be one of (Field, List[Field], Dataset, Grid)
  • fld_names (sequence, None) – grab specific fields by name, or None to grab all fields
  • selection (selection) – optional spatial selection
  • time (selection) – optional time selection
Returns:

pandas.DataFrame

viscid.dataset.from_dataframe(frame, crd_cols=None, time_col='time', datetime_col='datetime')[source]

Make either a DatasetTemporal or Grid from pandas dataframe

Parameters:
  • frame (pandas.DataFrame) – frame to parse
  • crd_cols (List[Str], None) – list of column names for coordinates
  • time_col (str) – column name of times
  • datetime_col (str) – column name of datetimes
Returns:

DatasetTemporal or Grid

Raises:

ValueError – if only 1 row given and crd_cols is None