reservoirflow.models.BlackOil.get_df#
- BlackOil.get_df(columns: list = ['time', 'cells', 'wells'], boundary: bool = True, units: bool = False, melt: bool = False, scale: bool = False, save: bool = False, drop_nan: bool = True, drop_zero: bool = True)#
Returns simulation data as a dataframe.
- Parameters:
columns (list[str], optional) –
selected columns to be added to the dataframe. The following options are available:
"time"
: for time steps as specified in dt."date"
: for dates as specified in dt and start_date."q"
,"rates"
: for all (cells and wells) rates."p"
,"pressures"
: for all (cells and wells) pressures."cells"
: for all cells rates and pressures."wells"
: for all wells rates and pressures."cells_rate"
: for all cells rates (including wells’ cells)."cells_pressure"
: for all cells pressures."wells_rate"
: for all wells rates."wells_pressure"
: for all wells pressures.
boundary (bool, optional) – include boundary cells. It is only relevant when cells columns are selected.
units (bool, optional) – column names with units (True) or without units (False).
melt (bool, optional) – to melt columns of the same property to one column. By default, cells id, xyz (based on grid fdir), step columns are included while wells columns (wells_rate, wells_pressure) are ignored.
scale (bool, optional) –
scale time, space (x, y, z), rates, and pressures. To change the scaling settings use set_scalers(). Current settings can be shown under scalers_dict. By default:
scalers_dict = { 'time':['MinMaxScaler', (0,1)], 'space':['MinMaxScaler', (-1,1)], 'pressure':['MinMaxScaler', (-1,1)], 'rate':[None,None] }
save (bool, optional) – save output as a csv file.
drop_nan (bool, optional) – drop columns which contain only nan values if melt is False. if melt is True, drop rows which contain any nan values.
drop_zero (bool, optional) – drop columns which contain only zero values. This argument is ignored if melt is True.
- Returns:
simulation data as a dataframe.
- Return type:
DataFrame