elphick.geomet.utils.pandas.MeanIntervalArray

class elphick.geomet.utils.pandas.MeanIntervalArray(data, closed: IntervalClosedType | None = None, dtype: Dtype | None = None, copy: bool = False, verify_integrity: bool = True)[source]
__init__(data, dtype=None, copy=False)[source]

Methods

__init__(data[, dtype, copy])

argmax([skipna])

Return the index of maximum value.

argmin([skipna])

Return the index of minimum value.

argsort(*[, ascending, kind, na_position])

Return the indices that would sort this array.

astype(dtype[, copy])

Cast to an ExtensionArray or NumPy array with dtype 'dtype'.

contains(other)

Check elementwise if the Intervals contain the value.

copy()

Return a copy of the array.

delete(loc)

dropna()

Return ExtensionArray without NA values.

duplicated([keep])

Return boolean ndarray denoting duplicate values.

equals(other)

Return if another array is equivalent to this array.

factorize([use_na_sentinel])

Encode the extension array as an enumerated type.

fillna([value, method, limit, copy])

Fill NA/NaN values using the specified method.

from_arrays(left, right[, closed, copy, dtype])

Construct from two arrays defining the left and right bounds.

from_breaks(breaks[, closed, copy, dtype])

Construct an IntervalArray from an array of splits.

from_tuples(data[, closed, copy, dtype])

Construct an IntervalArray from an array-like of tuples.

insert(loc, item)

Return a new IntervalArray inserting new item at location.

interpolate(*, method, axis, index, limit, ...)

See DataFrame.interpolate.__doc__.

isin(values)

Pointwise comparison for set containment in the given values.

isna()

A 1-D array indicating if each value is missing.

map(mapper[, na_action])

Map values using an input mapping or function.

max(*[, axis, skipna])

min(*[, axis, skipna])

overlaps(other)

Check elementwise if an Interval overlaps the values in the IntervalArray.

ravel([order])

Return a flattened view on this array.

repeat(repeats[, axis])

Repeat elements of a IntervalArray.

searchsorted(value[, side, sorter])

Find indices where elements should be inserted to maintain order.

set_closed(closed)

Return an identical IntervalArray closed on the specified side.

shift([periods, fill_value])

Shift values by desired number.

take(indices, *[, allow_fill, fill_value, axis])

Take elements from the IntervalArray.

to_numpy([dtype, copy, na_value])

Convert to a NumPy ndarray.

to_tuples([na_tuple])

Return an ndarray (if self is IntervalArray) or Index (if self is IntervalIndex) of tuples of the form (left, right).

tolist()

Return a list of the values.

transpose(*axes)

Return a transposed view on this array.

unique()

Compute the ExtensionArray of unique values.

value_counts([dropna])

Returns a Series containing counts of each interval.

view([dtype])

Return a view on the array.

Attributes

T

can_hold_na

closed

String describing the inclusive side the intervals.

closed_left

Check if the interval is closed on the left side.

closed_right

Check if the interval is closed on the right side.

dtype

An instance of ExtensionDtype.

is_empty

Indicates if an interval is empty, meaning it contains no points.

is_non_overlapping_monotonic

Return a boolean whether the IntervalArray is non-overlapping and monotonic.

left

Return the left endpoints of each Interval in the IntervalArray as an Index.

length

Return an Index with entries denoting the length of each Interval.

mean

mid

Return the midpoint of each Interval in the IntervalArray as an Index.

nbytes

The number of bytes needed to store this object in memory.

ndim

Extension Arrays are only allowed to be 1-dimensional.

open_left

Check if the interval is open on the left side.

open_right

Check if the interval is open on the right side.

right

Return the right endpoints of each Interval in the IntervalArray as an Index.

shape

Return a tuple of the array dimensions.

size

The number of elements in the array.