Source code for

"""Class for a collection of well interval properties"""

# NB. This class does not appear to be well formed and is a candidate for deprecation

import logging

log = logging.getLogger(__name__)

import pandas as pd

import as rqp_pc
import as rqp_wip
import as rqp_c

class WellIntervalPropertyCollection(rqp_pc.PropertyCollection):
    """Class for RESQML property collection for a WellboreFrame for interval or blocked well logs"""

[docs] def __init__(self, frame = None, property_set_root = None, realization = None): """Creates a new property collection related to interval or blocked well logs and a wellbore frame.""" super().__init__(support = frame, property_set_root = property_set_root, realization = realization)
[docs] def logs(self): """Generator that yields component Interval log or Blocked well log objects.""" return (rqp_wip.WellIntervalProperty(collection = self, part = part) for part in
[docs] def to_pandas(self, include_units = False): """Returns a dataframe with a column for each well log included in the collection.""" cell_indices = [ rqp_c.return_cell_indices(i, for i in if i != -1 ] data = {} for log in self.logs(): col_name = values = log.values() data[col_name] = values df = pd.DataFrame(data = data, index = cell_indices) return df