- resqpy.olio.wellspec_keywords.get_well_data(file: TextIO, well_name: str, pointer: int, column_list: List[str] = , selecting: bool = False, keep_duplicate_cells: bool = True, keep_null_columns: bool = True, date: Optional[str] = None) Optional[DataFrame] ¶
Creates a dataframe of the well data for a given well name and at a specific time in the wellspec file.
The pointer argument is used to go to the file location where the well dataset is located.
file (TextIO) – the opened wellspec file object.
well_name (str) – name of the well.
pointer (int) – the file object’s start position of the well data represented as number of bytes from the beginning of the file.
column_list (List[str]) – if present, each dataframe returned contains these columns, in this order. If None, the resulting dictionary contains only well names as keys (each mapping to None rather than a dataframe). If an empty list (default), each dataframe contains the columns listed in the corresponding wellspec header, in the order found in the file.
selecting (bool) – True if the column_list contains at least one column name, False otherwise (default).
keep_duplicate_cells (bool) – if True (default), duplicate cells are kept, otherwise only the last entry is kept.
keep_null_columns (bool) – if True (default), columns that contain all NA values are kept, otherwise they are removed.
date (str, optional) – the well date which is provided by the get_well_pointers function along with the well pointers.
Pandas dataframe of the well data or None if all the data are NA.