pandas.arrays.PandasArray

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

A pandas ExtensionArray for NumPy data.

New in version 0.24.0.

This is mostly for internal compatibility, and is not especially useful on its own.

Parameters
valuesndarray

The NumPy ndarray to wrap. Must be 1-dimensional.

copybool, default False

Whether to copy values.

Attributes

dtype

An instance of ‘ExtensionDtype’.

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.

Methods

argsort(self[, ascending, kind])

Return the indices that would sort this array.

astype(self, dtype[, copy])

Cast to a NumPy array with ‘dtype’.

copy(self[, deep])

Return a copy of the array.

dropna(self)

Return ExtensionArray without NA values

factorize(self, na_sentinel)

Encode the extension array as an enumerated type.

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

Fill NA/NaN values using the specified method.

isna(self)

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

repeat(self, repeats[, axis])

Repeat elements of a ExtensionArray.

searchsorted(self, value[, side, sorter])

Find indices where elements should be inserted to maintain order.

shift(self, periods, fill_value)

Shift values by desired number.

take(self, indices[, allow_fill, fill_value])

Take elements from an array.

to_numpy(self[, dtype, copy])

Convert the PandasArray to a numpy.ndarray.

unique(self)

Compute the ExtensionArray of unique values.

all

any

kurt

max

mean

median

min

prod

sem

skew

std

sum

var

Scroll To Top