pandas_dataframe_to_unit_arrays#
- metpy.units.pandas_dataframe_to_unit_arrays(df, column_units=None)[source]#
Attach units to data in pandas dataframes and return quantities.
- Parameters:
df (
pandas.DataFrame
) – Data in pandas dataframe.column_units (dict) – Dictionary of units to attach to columns of the dataframe. Overrides the units attribute if it is attached to the dataframe.
- Returns:
Dictionary containing Quantity instances with keys corresponding to the dataframe
column names.