nctoolkit.DataSet.to_dataframe#
- DataSet.to_dataframe(decode_times=True, drop_bnds=True, **kwargs)#
to_dataframe: Convert a dataset to a pandas data frame
- Parameters:
decode_times (boolean) – Set to False if you do not want xarray to decode the times prior to conversion to data frame. Default is True.
drop_bnds (boolean) – Set to False if you do not want to drop the bounds from the data frame. Variables/coordinates with ‘_bnds’ in their names will be dropped. Default is True.
**kwargs (kwargs) – Optional arguments to be sent to subset.
- Returns:
to_dataframe
- Return type:
pandas.DataFrame
Examples
If you want to convert a dataset to a pandas data frame, do the following:
>>> ds.to_dataframe()