cdf2df¶
-
heliopy.data.util.
cdf2df
(cdf, index_key, dtimeindex=True, badvalues=None, ignore=None, include=None)¶ Converts a cdf file to a pandas dataframe.
Note that this only works for 1 dimensional data, other data such as distribution functions or pitch angles will not work properly.
- Parameters
cdf (cdf) – Opened CDF file.
index_key (str) – The CDF key to use as the index in the output DataFrame.
dtimeindex (bool) – If
True
, the DataFrame index is parsed as a datetime. Default isTrue
.ignore (list) – In case a CDF file has columns that are unused / not required, then the column names can be passed as a list into the function.
include (str, list) – If only specific columns of a CDF file are desired, then the column names can be passed as a list into the function. Should not be used with
ignore
.
- Returns
df – Data frame with read in data.
- Return type