pandas.arrays.IntegerArray

class pandas.arrays.IntegerArray(values, mask, copy=False)[source]

Array of integer (optional missing) values.

We represent an IntegerArray with 2 numpy arrays:

  • data: contains a numpy integer array of the appropriate dtype
  • mask: a boolean array holding a mask on the data, True is missing

To construct an IntegerArray from generic array-like input, use integer_array function instead.

Parameters:
values : integer 1D numpy array
mask : boolean 1D numpy array
copy : bool, default False
Returns:
IntegerArray

Attributes

nbytes The number of bytes needed to store this object in memory.
ndim Extension Arrays are only allowed to be 1-dimensional.
shape Return a tuple of the array dimensions.
dtype  

Methods

argsort([ascending, kind]) Return the indices that would sort this array.
astype(dtype[, copy]) Cast to a NumPy array or IntegerArray with ‘dtype’.
copy([deep]) Return a copy of the array.
dropna() Return ExtensionArray without NA values
factorize([na_sentinel]) Encode the extension array as an enumerated type.
fillna([value, method, limit]) Fill NA/NaN values using the specified method.
isna() A 1-D array indicating if each value is missing.
repeat(repeats[, axis]) Repeat elements of a ExtensionArray.
searchsorted(value[, side, sorter]) Find indices where elements should be inserted to maintain order.
shift([periods, fill_value]) Shift values by desired number.
take(indexer[, allow_fill, fill_value]) Take elements from an array.
unique() Compute the ExtensionArray of unique values.
value_counts([dropna]) Returns a Series containing counts of each category.
Scroll To Top