blob: dfc24925db7d36805aac6436600295dd1ba7d61d [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyarrow.NumericArray &#8212; Apache Arrow v7.0.0</title>
<link href="../../_static/styles/theme.css?digest=1999514e3f237ded88cf" rel="stylesheet">
<link href="../../_static/styles/pydata-sphinx-theme.css?digest=1999514e3f237ded88cf" rel="stylesheet">
<link rel="stylesheet"
href="../../_static/vendor/fontawesome/5.13.0/css/all.min.css">
<link rel="preload" as="font" type="font/woff2" crossorigin
href="../../_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2">
<link rel="preload" as="font" type="font/woff2" crossorigin
href="../../_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2">
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/styles/pydata-sphinx-theme.css" />
<link rel="stylesheet" type="text/css" href="../../_static/tabs.css" />
<link rel="stylesheet" type="text/css" href="../../_static/theme_overrides.css" />
<link rel="preload" as="script" href="../../_static/scripts/pydata-sphinx-theme.js?digest=1999514e3f237ded88cf">
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<link rel="canonical" href="https://arrow.apache.org/docs/python/generated/pyarrow.NumericArray.html" />
<link rel="shortcut icon" href="../../_static/favicon.ico"/>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="pyarrow.UInt8Array" href="pyarrow.UInt8Array.html" />
<link rel="prev" title="pyarrow.NullArray" href="pyarrow.NullArray.html" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="docsearch:language" content="None">
<!-- Google Analytics -->
<!-- Matomo -->
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
/* We explicitly disable cookie tracking to avoid privacy issues */
_paq.push(['disableCookies']);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.apache.org/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '20']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
</head>
<body data-spy="scroll" data-target="#bd-toc-nav" data-offset="80">
<div class="container-fluid" id="banner"></div>
<div class="container-xl">
<div class="row">
<!-- Only show if we have sidebars configured, else just a small margin -->
<div class="col-12 col-md-3 bd-sidebar">
<div class="sidebar-start-items">
<a class="navbar-brand" href="../../index.html">
<img src="../../_static/arrow.png" class="logo" alt="logo">
</a>
<div id="version-search-wrapper">
<div id="version-button" class="dropdown">
<button type="button" class="btn btn-secondary btn-sm navbar-btn dropdown-toggle" id="version_switcher_button" data-toggle="dropdown">
7.0.0
<span class="caret"></span>
</button>
<div id="version_switcher" class="dropdown-menu list-group-flush py-0" aria-labelledby="version_switcher_button">
<!-- dropdown will be populated by javascript on page load -->
</div>
</div>
<script type="text/javascript">
// Function to construct the target URL from the JSON components
function buildURL(entry) {
var template = "https://arrow.apache.org/docs/{version}"; // supplied by jinja
template = template.replace("{version}", entry.version);
return template;
}
// Function to check if corresponding page path exists in other version of docs
// and, if so, go there instead of the homepage of the other docs version
function checkPageExistsAndRedirect(event) {
const currentFilePath = "python/generated/pyarrow.NumericArray.html",
otherDocsHomepage = event.target.getAttribute("href");
let tryUrl = `${otherDocsHomepage}${currentFilePath}`;
$.ajax({
type: 'HEAD',
url: tryUrl,
// if the page exists, go there
success: function() {
location.href = tryUrl;
}
}).fail(function() {
location.href = otherDocsHomepage;
});
return false;
}
// Function to populate the version switcher
(function () {
// get JSON config
$.getJSON("/docs/_static/versions.json", function(data, textStatus, jqXHR) {
// create the nodes first (before AJAX calls) to ensure the order is
// correct (for now, links will go to doc version homepage)
$.each(data, function(index, entry) {
// if no custom name specified (e.g., "latest"), use version string
if (!("name" in entry)) {
entry.name = entry.version;
}
// construct the appropriate URL, and add it to the dropdown
entry.url = buildURL(entry);
const node = document.createElement("a");
node.setAttribute("class", "list-group-item list-group-item-action py-1");
node.setAttribute("href", `${entry.url}`);
node.textContent = `${entry.name}`;
node.onclick = checkPageExistsAndRedirect;
$("#version_switcher").append(node);
});
});
})();
</script>
<form id="search-box" class="bd-search d-flex align-items-center" action="../../search.html" method="get">
<i class="icon fas fa-search"></i>
<input type="search" class="form-control" name="q" id="search-input" placeholder="Search the docs ..." aria-label="Search the docs ..." autocomplete="off" >
</form>
</div>
<nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation">
<div class="bd-toc-item active">
<p aria-level="2" class="caption" role="heading">
<span class="caption-text">
Supported Environments
</span>
</p>
<ul class="current nav bd-sidenav">
<li class="toctree-l1">
<a class="reference internal" href="../../c_glib/index.html">
C/GLib
</a>
</li>
<li class="toctree-l1 has-children">
<a class="reference internal" href="../../cpp/index.html">
C++
</a>
<input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox"/>
<label for="toctree-checkbox-1">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l2 has-children">
<a class="reference internal" href="../../cpp/getting_started.html">
User Guide
</a>
<input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" type="checkbox"/>
<label for="toctree-checkbox-2">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/overview.html">
High-Level Overview
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/conventions.html">
Conventions
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/build_system.html">
Using Arrow C++ in your own project
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/memory.html">
Memory Management
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/arrays.html">
Arrays
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/datatypes.html">
Data Types
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/tables.html">
Tabular Data
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/compute.html">
Compute Functions
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/streaming_execution.html">
Streaming execution engine
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/io.html">
Input / output and filesystems
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/ipc.html">
Reading and writing the Arrow IPC format
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/parquet.html">
Reading and writing Parquet files
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/csv.html">
Reading and Writing CSV files
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/json.html">
Reading JSON files
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/dataset.html">
Tabular Datasets
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/flight.html">
Arrow Flight RPC
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/gdb.html">
Debugging code using Arrow
</a>
</li>
</ul>
</li>
<li class="toctree-l2 has-children">
<a class="reference internal" href="../../cpp/examples/index.html">
Examples
</a>
<input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" type="checkbox"/>
<label for="toctree-checkbox-3">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/examples/cmake_minimal_build.html">
Minimal build using CMake
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/examples/compute_and_write_example.html">
Compute and Write CSV Example
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/examples/dataset_documentation_example.html">
Arrow Datasets example
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/examples/row_columnar_conversion.html">
Row to columnar conversion
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/examples/tuple_range_conversion.html">
std::tuple-like ranges to Arrow
</a>
</li>
</ul>
</li>
<li class="toctree-l2 has-children">
<a class="reference internal" href="../../cpp/api.html">
API Reference
</a>
<input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" type="checkbox"/>
<label for="toctree-checkbox-4">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/support.html">
Programming Support
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/memory.html">
Memory (management)
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/datatype.html">
Data Types
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/array.html">
Arrays
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/scalar.html">
Scalars
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/builder.html">
Array Builders
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/table.html">
Two-dimensional Datasets
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/c_abi.html">
C Interfaces
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/compute.html">
Compute Functions
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/tensor.html">
Tensors
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/utilities.html">
Utilities
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/async.html">
Asynchronous programming
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/io.html">
Input / output
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/ipc.html">
Arrow IPC
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/formats.html">
File Formats
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/cuda.html">
CUDA support
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/flight.html">
Arrow Flight RPC
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/filesystem.html">
Filesystems
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../cpp/api/dataset.html">
Dataset
</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1">
<a class="reference external" href="https://github.com/apache/arrow/blob/master/csharp/README.md">
C#
</a>
</li>
<li class="toctree-l1">
<a class="reference external" href="https://pkg.go.dev/github.com/apache/arrow/go">
Go
</a>
</li>
<li class="toctree-l1 has-children">
<a class="reference internal" href="../../java/index.html">
Java
</a>
<input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" type="checkbox"/>
<label for="toctree-checkbox-5">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l2">
<a class="reference internal" href="../../java/vector.html">
ValueVector
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../java/vector_schema_root.html">
VectorSchemaRoot
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../java/ipc.html">
Reading/Writing IPC formats
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../java/algorithm.html">
Java Algorithms
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../java/dataset.html">
Dataset
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../java/reference/index.html">
Reference (javadoc)
</a>
</li>
</ul>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../js/index.html">
JavaScript
</a>
</li>
<li class="toctree-l1">
<a class="reference external" href="https://github.com/apache/arrow/blob/master/julia/Arrow/README.md">
Julia
</a>
</li>
<li class="toctree-l1">
<a class="reference external" href="https://github.com/apache/arrow/blob/master/matlab/README.md">
MATLAB
</a>
</li>
<li class="toctree-l1 current active has-children">
<a class="reference internal" href="../index.html">
Python
</a>
<input checked="" class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" type="checkbox"/>
<label for="toctree-checkbox-6">
<i class="fas fa-chevron-down">
</i>
</label>
<ul class="current">
<li class="toctree-l2">
<a class="reference internal" href="../install.html">
Installing PyArrow
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../getstarted.html">
Getting Started
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../data.html">
Data Types and In-Memory Data Model
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../compute.html">
Compute Functions
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../memory.html">
Memory and IO Interfaces
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../ipc.html">
Streaming, Serialization, and IPC
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../filesystems.html">
Filesystem Interface
</a>
</li>
<li class="toctree-l2 has-children">
<a class="reference internal" href="../filesystems_deprecated.html">
Filesystem Interface (legacy)
</a>
<input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" type="checkbox"/>
<label for="toctree-checkbox-7">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.hdfs.connect.html">
pyarrow.hdfs.connect
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.cat.html">
pyarrow.HadoopFileSystem.cat
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.chmod.html">
pyarrow.HadoopFileSystem.chmod
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.chown.html">
pyarrow.HadoopFileSystem.chown
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.delete.html">
pyarrow.HadoopFileSystem.delete
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.df.html">
pyarrow.HadoopFileSystem.df
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.disk_usage.html">
pyarrow.HadoopFileSystem.disk_usage
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.download.html">
pyarrow.HadoopFileSystem.download
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.exists.html">
pyarrow.HadoopFileSystem.exists
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.get_capacity.html">
pyarrow.HadoopFileSystem.get_capacity
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.get_space_used.html">
pyarrow.HadoopFileSystem.get_space_used
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.info.html">
pyarrow.HadoopFileSystem.info
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.ls.html">
pyarrow.HadoopFileSystem.ls
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.mkdir.html">
pyarrow.HadoopFileSystem.mkdir
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.open.html">
pyarrow.HadoopFileSystem.open
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.rename.html">
pyarrow.HadoopFileSystem.rename
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.rm.html">
pyarrow.HadoopFileSystem.rm
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HadoopFileSystem.upload.html">
pyarrow.HadoopFileSystem.upload
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="pyarrow.HdfsFile.html">
pyarrow.HdfsFile
</a>
</li>
</ul>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../plasma.html">
The Plasma In-Memory Object Store
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../numpy.html">
NumPy Integration
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../pandas.html">
Pandas Integration
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../timestamps.html">
Timestamps
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../csv.html">
Reading and Writing CSV files
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../feather.html">
Feather File Format
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../json.html">
Reading JSON files
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../parquet.html">
Reading and Writing the Apache Parquet Format
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../dataset.html">
Tabular Datasets
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../extending_types.html">
Extending pyarrow
</a>
</li>
<li class="toctree-l2 has-children">
<a class="reference internal" href="../integration.html">
PyArrow Integrations
</a>
<input class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" type="checkbox"/>
<label for="toctree-checkbox-8">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l3">
<a class="reference internal" href="../integration/python_r.html">
Integrating PyArrow with R
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../integration/extending.html">
Using pyarrow from C++ and Cython Code
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../integration/cuda.html">
CUDA Integration
</a>
</li>
</ul>
</li>
<li class="toctree-l2 current active has-children">
<a class="reference internal" href="../api.html">
API Reference
</a>
<input checked="" class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" type="checkbox"/>
<label for="toctree-checkbox-9">
<i class="fas fa-chevron-down">
</i>
</label>
<ul class="current">
<li class="toctree-l3">
<a class="reference internal" href="../api/datatypes.html">
Data Types and Schemas
</a>
</li>
<li class="toctree-l3 current active">
<a class="reference internal" href="../api/arrays.html">
Arrays and Scalars
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../api/memory.html">
Buffers and Memory
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../api/compute.html">
Compute Functions
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../api/files.html">
Streams and File Access
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../api/tables.html">
Tables and Tensors
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../api/ipc.html">
Serialization and IPC
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../api/flight.html">
Arrow Flight
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../api/formats.html">
Tabular File Formats
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../api/filesystems.html">
Filesystems
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../api/dataset.html">
Dataset
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../api/plasma.html">
Plasma In-Memory Object Store
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../api/cuda.html">
CUDA Integration
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../api/misc.html">
Miscellaneous
</a>
</li>
</ul>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../getting_involved.html">
Getting Involved
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../benchmarks.html">
Benchmarks
</a>
</li>
</ul>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../r/index.html">
R
</a>
</li>
<li class="toctree-l1">
<a class="reference external" href="https://github.com/apache/arrow/blob/master/ruby/README.md">
Ruby
</a>
</li>
<li class="toctree-l1">
<a class="reference external" href="https://docs.rs/crate/arrow/">
Rust
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../status.html">
Implementation Status
</a>
</li>
</ul>
<p aria-level="2" class="caption" role="heading">
<span class="caption-text">
Cookbooks
</span>
</p>
<ul class="nav bd-sidenav">
<li class="toctree-l1">
<a class="reference external" href="https://arrow.apache.org/cookbook/cpp/">
C++
</a>
</li>
<li class="toctree-l1">
<a class="reference external" href="https://arrow.apache.org/cookbook/py/">
Python
</a>
</li>
<li class="toctree-l1">
<a class="reference external" href="https://arrow.apache.org/cookbook/r/">
R
</a>
</li>
</ul>
<p aria-level="2" class="caption" role="heading">
<span class="caption-text">
Specifications and Protocols
</span>
</p>
<ul class="nav bd-sidenav">
<li class="toctree-l1">
<a class="reference internal" href="../../format/Versioning.html">
Format Versioning and Stability
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../format/Columnar.html">
Arrow Columnar Format
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../format/Flight.html">
Arrow Flight RPC
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../format/Integration.html">
Integration Testing
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../format/CDataInterface.html">
The Arrow C data interface
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../format/CStreamInterface.html">
The Arrow C stream interface
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../format/Other.html">
Other Data Structures
</a>
</li>
</ul>
<p aria-level="2" class="caption" role="heading">
<span class="caption-text">
Development
</span>
</p>
<ul class="nav bd-sidenav">
<li class="toctree-l1">
<a class="reference internal" href="../../developers/contributing.html">
Contributing to Apache Arrow
</a>
</li>
<li class="toctree-l1 has-children">
<a class="reference internal" href="../../developers/guide/index.html">
New Contributor’s Guide
</a>
<input class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" type="checkbox"/>
<label for="toctree-checkbox-10">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/guide/architectural_overview.html">
Architectural Overview
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/guide/communication.html">
Communication
</a>
</li>
<li class="toctree-l2 has-children">
<a class="reference internal" href="../../developers/guide/step_by_step/index.html">
Steps in making your first PR
</a>
<input class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" type="checkbox"/>
<label for="toctree-checkbox-11">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l3">
<a class="reference internal" href="../../developers/guide/step_by_step/set_up.html">
Set up
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../developers/guide/step_by_step/building.html">
Building the Arrow libraries 🏋🏿‍♀️
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../developers/guide/step_by_step/finding_issues.html">
Finding good first issues 🔎
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../developers/guide/step_by_step/arrow_codebase.html">
Working on the Arrow codebase 🧐
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../developers/guide/step_by_step/testing.html">
Testing 🧪
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../developers/guide/step_by_step/pr_and_github.html">
Lifecycle of a pull request
</a>
</li>
</ul>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/guide/documentation.html">
Helping with documentation
</a>
</li>
<li class="toctree-l2 has-children">
<a class="reference internal" href="../../developers/guide/tutorials/index.html">
Tutorials
</a>
<input class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" type="checkbox"/>
<label for="toctree-checkbox-12">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l3">
<a class="reference internal" href="../../developers/guide/tutorials/python_tutorial.html">
Python tutorial
</a>
</li>
<li class="toctree-l3">
<a class="reference internal" href="../../developers/guide/tutorials/r_tutorial.html">
R tutorial
</a>
</li>
</ul>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/guide/resources.html">
Additional information and resources
</a>
</li>
</ul>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../developers/reviewing.html">
Reviewing contributions
</a>
</li>
<li class="toctree-l1 has-children">
<a class="reference internal" href="../../developers/cpp/index.html">
C++ Development
</a>
<input class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" type="checkbox"/>
<label for="toctree-checkbox-13">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/cpp/building.html">
Building Arrow C++
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/cpp/development.html">
Development Guidelines
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/cpp/windows.html">
Developing on Windows
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/cpp/conventions.html">
Conventions
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/cpp/fuzzing.html">
Fuzzing Arrow C++
</a>
</li>
</ul>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../developers/python.html">
Python Development
</a>
</li>
<li class="toctree-l1 has-children">
<a class="reference internal" href="../../developers/continuous_integration/index.html">
Continuous Integration
</a>
<input class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" type="checkbox"/>
<label for="toctree-checkbox-14">
<i class="fas fa-chevron-down">
</i>
</label>
<ul>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/continuous_integration/overview.html">
Continuous Integration
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/continuous_integration/docker.html">
Running Docker Builds
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/continuous_integration/archery.html">
Daily Development using Archery
</a>
</li>
<li class="toctree-l2">
<a class="reference internal" href="../../developers/continuous_integration/crossbow.html">
Packaging and Testing with Crossbow
</a>
</li>
</ul>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../developers/benchmarks.html">
Benchmarks
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../developers/documentation.html">
Building the Documentation
</a>
</li>
<li class="toctree-l1">
<a class="reference internal" href="../../developers/computeir.html">
Arrow Compute IR (Intermediate Representation)
</a>
</li>
</ul>
</div>
</nav>
</div>
<div class="sidebar-end-items">
</div>
</div>
<div class="d-none d-xl-block col-xl-2 bd-toc">
<div class="toc-item">
<nav id="bd-toc-nav">
</nav>
</div>
<div class="toc-item">
<div class="tocsection editthispage">
<a href="https://github.com/apache/arrow/edit/master/docs/source/python/generated/pyarrow.NumericArray.rst">
<i class="fas fa-pencil-alt"></i> Edit this page
</a>
</div>
</div>
</div>
<main class="col-12 col-md-9 col-xl-7 py-md-5 pl-md-5 pr-md-4 bd-content" role="main">
<div>
<div class="section" id="pyarrow-numericarray">
<h1>pyarrow.NumericArray<a class="headerlink" href="#pyarrow-numericarray" title="Permalink to this headline"></a></h1>
<dl class="py class">
<dt class="sig sig-object py" id="pyarrow.NumericArray">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">pyarrow.</span></span><span class="sig-name descname"><span class="pre">NumericArray</span></span><a class="headerlink" href="#pyarrow.NumericArray" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="pyarrow.Array.html#pyarrow.Array" title="pyarrow.lib.Array"><code class="xref py py-class docutils literal notranslate"><span class="pre">pyarrow.lib.Array</span></code></a></p>
<p>A base class for Arrow numeric arrays.</p>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.__init__">
<span class="sig-name descname"><span class="pre">__init__</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.__init__" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<p class="rubric">Methods</p>
<table class="longtable table autosummary">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.__init__" title="pyarrow.NumericArray.__init__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">__init__</span></code></a>(*args, **kwargs)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.buffers" title="pyarrow.NumericArray.buffers"><code class="xref py py-obj docutils literal notranslate"><span class="pre">buffers</span></code></a>(self)</p></td>
<td><p>Return a list of Buffer objects pointing to this array's physical storage.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.cast" title="pyarrow.NumericArray.cast"><code class="xref py py-obj docutils literal notranslate"><span class="pre">cast</span></code></a>(self, target_type[, safe])</p></td>
<td><p>Cast array values to another data type</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.dictionary_encode" title="pyarrow.NumericArray.dictionary_encode"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dictionary_encode</span></code></a>(self[, null_encoding])</p></td>
<td><p>Compute dictionary-encoded representation of array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.diff" title="pyarrow.NumericArray.diff"><code class="xref py py-obj docutils literal notranslate"><span class="pre">diff</span></code></a>(self, Array other)</p></td>
<td><p>Compare contents of this array against another one.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.drop_null" title="pyarrow.NumericArray.drop_null"><code class="xref py py-obj docutils literal notranslate"><span class="pre">drop_null</span></code></a>(self)</p></td>
<td><p>Remove missing values from an array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.equals" title="pyarrow.NumericArray.equals"><code class="xref py py-obj docutils literal notranslate"><span class="pre">equals</span></code></a>(self, Array other)</p></td>
<td><p></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.fill_null" title="pyarrow.NumericArray.fill_null"><code class="xref py py-obj docutils literal notranslate"><span class="pre">fill_null</span></code></a>(self, fill_value)</p></td>
<td><p>See pyarrow.compute.fill_null for usage.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.filter" title="pyarrow.NumericArray.filter"><code class="xref py py-obj docutils literal notranslate"><span class="pre">filter</span></code></a>(self, Array mask, *[, ...])</p></td>
<td><p>Select values from an array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.format" title="pyarrow.NumericArray.format"><code class="xref py py-obj docutils literal notranslate"><span class="pre">format</span></code></a>(self, **kwargs)</p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.from_buffers" title="pyarrow.NumericArray.from_buffers"><code class="xref py py-obj docutils literal notranslate"><span class="pre">from_buffers</span></code></a>(DataType type, length, buffers)</p></td>
<td><p>Construct an Array from a sequence of buffers.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.from_pandas" title="pyarrow.NumericArray.from_pandas"><code class="xref py py-obj docutils literal notranslate"><span class="pre">from_pandas</span></code></a>(obj[, mask, type])</p></td>
<td><p>Convert pandas.Series to an Arrow Array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.get_total_buffer_size" title="pyarrow.NumericArray.get_total_buffer_size"><code class="xref py py-obj docutils literal notranslate"><span class="pre">get_total_buffer_size</span></code></a>(self)</p></td>
<td><p>The sum of bytes in each buffer referenced by the array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.index" title="pyarrow.NumericArray.index"><code class="xref py py-obj docutils literal notranslate"><span class="pre">index</span></code></a>(self, value[, start, end, memory_pool])</p></td>
<td><p>Find the first index of a value.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.is_null" title="pyarrow.NumericArray.is_null"><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_null</span></code></a>(self, *[, nan_is_null])</p></td>
<td><p>Return BooleanArray indicating the null values.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.is_valid" title="pyarrow.NumericArray.is_valid"><code class="xref py py-obj docutils literal notranslate"><span class="pre">is_valid</span></code></a>(self)</p></td>
<td><p>Return BooleanArray indicating the non-null values.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.slice" title="pyarrow.NumericArray.slice"><code class="xref py py-obj docutils literal notranslate"><span class="pre">slice</span></code></a>(self[, offset, length])</p></td>
<td><p>Compute zero-copy slice of this array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.sum" title="pyarrow.NumericArray.sum"><code class="xref py py-obj docutils literal notranslate"><span class="pre">sum</span></code></a>(self, **kwargs)</p></td>
<td><p>Sum the values in a numerical array.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.take" title="pyarrow.NumericArray.take"><code class="xref py py-obj docutils literal notranslate"><span class="pre">take</span></code></a>(self, indices)</p></td>
<td><p>Select values from an array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.to_numpy" title="pyarrow.NumericArray.to_numpy"><code class="xref py py-obj docutils literal notranslate"><span class="pre">to_numpy</span></code></a>(self[, zero_copy_only, writable])</p></td>
<td><p>Return a NumPy view or copy of this array (experimental).</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.to_pandas" title="pyarrow.NumericArray.to_pandas"><code class="xref py py-obj docutils literal notranslate"><span class="pre">to_pandas</span></code></a>(self[, memory_pool, categories, ...])</p></td>
<td><p>Convert to a pandas-compatible NumPy array or DataFrame, as appropriate</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.to_pylist" title="pyarrow.NumericArray.to_pylist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">to_pylist</span></code></a>(self)</p></td>
<td><p>Convert to a list of native Python objects.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.to_string" title="pyarrow.NumericArray.to_string"><code class="xref py py-obj docutils literal notranslate"><span class="pre">to_string</span></code></a>(self, *, int indent=2, ...)</p></td>
<td><p>Render a &quot;pretty-printed&quot; string representation of the Array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.tolist" title="pyarrow.NumericArray.tolist"><code class="xref py py-obj docutils literal notranslate"><span class="pre">tolist</span></code></a>(self)</p></td>
<td><p>Alias of to_pylist for compatibility with NumPy.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.unique" title="pyarrow.NumericArray.unique"><code class="xref py py-obj docutils literal notranslate"><span class="pre">unique</span></code></a>(self)</p></td>
<td><p>Compute distinct elements in array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.validate" title="pyarrow.NumericArray.validate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">validate</span></code></a>(self, *[, full])</p></td>
<td><p>Perform validation checks.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.value_counts" title="pyarrow.NumericArray.value_counts"><code class="xref py py-obj docutils literal notranslate"><span class="pre">value_counts</span></code></a>(self)</p></td>
<td><p>Compute counts of unique elements in array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.view" title="pyarrow.NumericArray.view"><code class="xref py py-obj docutils literal notranslate"><span class="pre">view</span></code></a>(self, target_type)</p></td>
<td><p>Return zero-copy &quot;view&quot; of array as another data type.</p></td>
</tr>
</tbody>
</table>
<p class="rubric">Attributes</p>
<table class="longtable table autosummary">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.nbytes" title="pyarrow.NumericArray.nbytes"><code class="xref py py-obj docutils literal notranslate"><span class="pre">nbytes</span></code></a></p></td>
<td><p>Total number of bytes consumed by the elements of the array.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.null_count" title="pyarrow.NumericArray.null_count"><code class="xref py py-obj docutils literal notranslate"><span class="pre">null_count</span></code></a></p></td>
<td><p></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyarrow.NumericArray.offset" title="pyarrow.NumericArray.offset"><code class="xref py py-obj docutils literal notranslate"><span class="pre">offset</span></code></a></p></td>
<td><p>A relative position into another array's data.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyarrow.NumericArray.type" title="pyarrow.NumericArray.type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">type</span></code></a></p></td>
<td><p></p></td>
</tr>
</tbody>
</table>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.buffers">
<span class="sig-name descname"><span class="pre">buffers</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.buffers" title="Permalink to this definition"></a></dt>
<dd><p>Return a list of Buffer objects pointing to this array’s physical
storage.</p>
<p>To correctly interpret these buffers, you need to also apply the offset
multiplied with the size of the stored data type.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.cast">
<span class="sig-name descname"><span class="pre">cast</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">safe</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.cast" title="Permalink to this definition"></a></dt>
<dd><p>Cast array values to another data type</p>
<p>See pyarrow.compute.cast for usage</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.dictionary_encode">
<span class="sig-name descname"><span class="pre">dictionary_encode</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">null_encoding</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'mask'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.dictionary_encode" title="Permalink to this definition"></a></dt>
<dd><p>Compute dictionary-encoded representation of array.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.diff">
<span class="sig-name descname"><span class="pre">diff</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Array</span> <span class="pre">other</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.diff" title="Permalink to this definition"></a></dt>
<dd><p>Compare contents of this array against another one.</p>
<p>Return string containing the result of arrow::Diff comparing contents
of this array against the other array.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.drop_null">
<span class="sig-name descname"><span class="pre">drop_null</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.drop_null" title="Permalink to this definition"></a></dt>
<dd><p>Remove missing values from an array.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.equals">
<span class="sig-name descname"><span class="pre">equals</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Array</span> <span class="pre">other</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.equals" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.fill_null">
<span class="sig-name descname"><span class="pre">fill_null</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">fill_value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.fill_null" title="Permalink to this definition"></a></dt>
<dd><p>See pyarrow.compute.fill_null for usage.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.filter">
<span class="sig-name descname"><span class="pre">filter</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">Array</span> <span class="pre">mask</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">null_selection_behavior=u'drop'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.filter" title="Permalink to this definition"></a></dt>
<dd><p>Select values from an array. See pyarrow.compute.filter for full usage.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.format">
<span class="sig-name descname"><span class="pre">format</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.format" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.from_buffers">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_buffers</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">DataType</span> <span class="pre">type</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">length</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">buffers</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">null_count=-1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">offset=0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">children=None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.from_buffers" title="Permalink to this definition"></a></dt>
<dd><p>Construct an Array from a sequence of buffers.</p>
<p>The concrete type returned depends on the datatype.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl>
<dt><strong>type</strong><span class="classifier"><a class="reference internal" href="pyarrow.DataType.html#pyarrow.DataType" title="pyarrow.DataType"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DataType</span></code></a></span></dt><dd><p>The value type of the array.</p>
</dd>
<dt><strong>length</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">int</span></code></a></span></dt><dd><p>The number of values in the array.</p>
</dd>
<dt><strong>buffers</strong><span class="classifier"><code class="xref py py-obj docutils literal notranslate"><span class="pre">List</span></code>[<a class="reference internal" href="pyarrow.Buffer.html#pyarrow.Buffer" title="pyarrow.Buffer"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Buffer</span></code></a>]</span></dt><dd><p>The buffers backing this array.</p>
</dd>
<dt><strong>null_count</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">int</span></code></a>, default -1</span></dt><dd><p>The number of null entries in the array. Negative value means that
the null count is not known.</p>
</dd>
<dt><strong>offset</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">int</span></code></a>, default 0</span></dt><dd><p>The array’s logical offset (in values, not in bytes) from the
start of each buffer.</p>
</dd>
<dt><strong>children</strong><span class="classifier"><code class="xref py py-obj docutils literal notranslate"><span class="pre">List</span></code>[<a class="reference internal" href="pyarrow.Array.html#pyarrow.Array" title="pyarrow.Array"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Array</span></code></a>], default <a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">None</span></code></a></span></dt><dd><p>Nested type children with length matching type.num_fields.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl>
<dt><strong>array</strong><span class="classifier"><a class="reference internal" href="pyarrow.Array.html#pyarrow.Array" title="pyarrow.Array"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Array</span></code></a></span></dt><dd></dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.from_pandas">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_pandas</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">obj</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mask=None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type=None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">safe=True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">MemoryPool</span> <span class="pre">memory_pool=None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.from_pandas" title="Permalink to this definition"></a></dt>
<dd><p>Convert pandas.Series to an Arrow Array.</p>
<p>This method uses Pandas semantics about what values indicate
nulls. See pyarrow.array for more general conversion from arrays or
sequences to Arrow arrays.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl>
<dt><strong>obj</strong><span class="classifier"><a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.22)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">ndarray</span></code></a>, <a class="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v1.4.0)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pandas.Series</span></code></a>, <a class="reference internal" href="pyarrow.array.html#pyarrow.array" title="pyarrow.array"><code class="xref py py-func docutils literal notranslate"><span class="pre">array-like</span></code></a></span></dt><dd></dd>
<dt><strong>mask</strong><span class="classifier"><a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.22)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">array</span></code></a> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>), optional</span></dt><dd><p>Indicate which values are null (True) or not null (False).</p>
</dd>
<dt><strong>type</strong><span class="classifier"><a class="reference internal" href="pyarrow.DataType.html#pyarrow.DataType" title="pyarrow.DataType"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyarrow.DataType</span></code></a></span></dt><dd><p>Explicit type to attempt to coerce to, otherwise will be inferred
from the data.</p>
</dd>
<dt><strong>safe</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">True</span></code></a></span></dt><dd><p>Check for overflows or other unsafe conversions.</p>
</dd>
<dt><strong>memory_pool</strong><span class="classifier"><a class="reference internal" href="pyarrow.MemoryPool.html#pyarrow.MemoryPool" title="pyarrow.MemoryPool"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyarrow.MemoryPool</span></code></a>, optional</span></dt><dd><p>If not passed, will allocate memory from the currently-set default
memory pool.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl>
<dt><strong>array</strong><span class="classifier"><a class="reference internal" href="pyarrow.Array.html#pyarrow.Array" title="pyarrow.Array"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyarrow.Array</span></code></a> or <a class="reference internal" href="pyarrow.ChunkedArray.html#pyarrow.ChunkedArray" title="pyarrow.ChunkedArray"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pyarrow.ChunkedArray</span></code></a></span></dt><dd><p>ChunkedArray is returned if object data overflows binary buffer.</p>
</dd>
</dl>
</dd>
</dl>
<p class="rubric">Notes</p>
<p>Localized timestamps will currently be returned as UTC (pandas’s native
representation). Timezone-naive data will be implicitly interpreted as
UTC.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.get_total_buffer_size">
<span class="sig-name descname"><span class="pre">get_total_buffer_size</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.get_total_buffer_size" title="Permalink to this definition"></a></dt>
<dd><p>The sum of bytes in each buffer referenced by the array.</p>
<p>An array may only reference a portion of a buffer.
This method will overestimate in this case and return the
byte size of the entire buffer.</p>
<p>If a buffer is referenced multiple times then it will
only be counted once.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.index">
<span class="sig-name descname"><span class="pre">index</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">start</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">end</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_pool</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.index" title="Permalink to this definition"></a></dt>
<dd><p>Find the first index of a value.</p>
<p>See pyarrow.compute.index for full usage.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.is_null">
<span class="sig-name descname"><span class="pre">is_null</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">nan_is_null</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.is_null" title="Permalink to this definition"></a></dt>
<dd><p>Return BooleanArray indicating the null values.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl>
<dt><strong>nan_is_null</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a> (optional, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#False" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">False</span></code></a>)</span></dt><dd><p>Whether floating-point NaN values should also be considered null.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl>
<dt><strong>array</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a> <a class="reference internal" href="pyarrow.Array.html#pyarrow.Array" title="pyarrow.Array"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Array</span></code></a></span></dt><dd></dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.is_valid">
<span class="sig-name descname"><span class="pre">is_valid</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.is_valid" title="Permalink to this definition"></a></dt>
<dd><p>Return BooleanArray indicating the non-null values.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="pyarrow.NumericArray.nbytes">
<span class="sig-name descname"><span class="pre">nbytes</span></span><a class="headerlink" href="#pyarrow.NumericArray.nbytes" title="Permalink to this definition"></a></dt>
<dd><p>Total number of bytes consumed by the elements of the array.</p>
<p>In other words, the sum of bytes from all buffer
ranges referenced.</p>
<p>Unlike <cite>get_total_buffer_size</cite> this method will account for array
offsets.</p>
<p>If buffers are shared between arrays then the shared
portion will be counted multiple times.</p>
<p>The dictionary of dictionary arrays will always be counted in their
entirety even if the array only references a portion of the dictionary.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="pyarrow.NumericArray.null_count">
<span class="sig-name descname"><span class="pre">null_count</span></span><a class="headerlink" href="#pyarrow.NumericArray.null_count" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="pyarrow.NumericArray.offset">
<span class="sig-name descname"><span class="pre">offset</span></span><a class="headerlink" href="#pyarrow.NumericArray.offset" title="Permalink to this definition"></a></dt>
<dd><p>A relative position into another array’s data.</p>
<p>The purpose is to enable zero-copy slicing. This value defaults to zero
but must be applied on all operations with the physical storage
buffers.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.slice">
<span class="sig-name descname"><span class="pre">slice</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">offset</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">length</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.slice" title="Permalink to this definition"></a></dt>
<dd><p>Compute zero-copy slice of this array.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl>
<dt><strong>offset</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">int</span></code></a>, default 0</span></dt><dd><p>Offset from start of array to slice.</p>
</dd>
<dt><strong>length</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">int</span></code></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">None</span></code></a></span></dt><dd><p>Length of slice (default is until end of Array starting from
offset).</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl>
<dt><strong>sliced</strong><span class="classifier"><a class="reference internal" href="pyarrow.RecordBatch.html#pyarrow.RecordBatch" title="pyarrow.RecordBatch"><code class="xref py py-obj docutils literal notranslate"><span class="pre">RecordBatch</span></code></a></span></dt><dd></dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.sum">
<span class="sig-name descname"><span class="pre">sum</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.sum" title="Permalink to this definition"></a></dt>
<dd><p>Sum the values in a numerical array.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.take">
<span class="sig-name descname"><span class="pre">take</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">indices</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.take" title="Permalink to this definition"></a></dt>
<dd><p>Select values from an array. See pyarrow.compute.take for full usage.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.to_numpy">
<span class="sig-name descname"><span class="pre">to_numpy</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">zero_copy_only</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">writable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.to_numpy" title="Permalink to this definition"></a></dt>
<dd><p>Return a NumPy view or copy of this array (experimental).</p>
<p>By default, tries to return a view of this array. This is only
supported for primitive arrays with the same memory layout as NumPy
(i.e. integers, floating point, ..) and without any nulls.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl>
<dt><strong>zero_copy_only</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">True</span></code></a></span></dt><dd><p>If True, an exception will be raised if the conversion to a numpy
array would require copying the underlying data (e.g. in presence
of nulls, or for non-primitive types).</p>
</dd>
<dt><strong>writable</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#False" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">False</span></code></a></span></dt><dd><p>For numpy arrays created with zero copy (view on the Arrow data),
the resulting array is not writable (Arrow data is immutable).
By setting this to True, a copy of the array is made to ensure
it is writable.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl>
<dt><strong>array</strong><span class="classifier"><a class="reference external" href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray" title="(in NumPy v1.22)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">numpy.ndarray</span></code></a></span></dt><dd></dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.to_pandas">
<span class="sig-name descname"><span class="pre">to_pandas</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_pool=None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">categories=None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">strings_to_categorical=False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">zero_copy_only=False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">integer_object_nulls=False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">date_as_object=True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">timestamp_as_object=False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">use_threads=True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">deduplicate_objects=True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">ignore_metadata=False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">safe=True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">split_blocks=False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">self_destruct=False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">types_mapper=None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.to_pandas" title="Permalink to this definition"></a></dt>
<dd><p>Convert to a pandas-compatible NumPy array or DataFrame, as appropriate</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl>
<dt><strong>memory_pool</strong><span class="classifier"><a class="reference internal" href="pyarrow.MemoryPool.html#pyarrow.MemoryPool" title="pyarrow.MemoryPool"><code class="xref py py-obj docutils literal notranslate"><span class="pre">MemoryPool</span></code></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">None</span></code></a></span></dt><dd><p>Arrow MemoryPool to use for allocations. Uses the default memory
pool is not passed.</p>
</dd>
<dt><strong>strings_to_categorical</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#False" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">False</span></code></a></span></dt><dd><p>Encode string (UTF8) and binary types to pandas.Categorical.</p>
</dd>
<dt><strong>categories: list, default empty</strong></dt><dd><p>List of fields that should be returned as pandas.Categorical. Only
applies to table-like data structures.</p>
</dd>
<dt><strong>zero_copy_only</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#False" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">False</span></code></a></span></dt><dd><p>Raise an ArrowException if this function call would require copying
the underlying data.</p>
</dd>
<dt><strong>integer_object_nulls</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#False" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">False</span></code></a></span></dt><dd><p>Cast integers with nulls to objects</p>
</dd>
<dt><strong>date_as_object</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">True</span></code></a></span></dt><dd><p>Cast dates to objects. If False, convert to datetime64[ns] dtype.</p>
</dd>
<dt><strong>timestamp_as_object</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#False" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">False</span></code></a></span></dt><dd><p>Cast non-nanosecond timestamps (np.datetime64) to objects. This is
useful if you have timestamps that don’t fit in the normal date
range of nanosecond timestamps (1678 CE-2262 CE).
If False, all timestamps are converted to datetime64[ns] dtype.</p>
</dd>
<dt><strong>use_threads</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">True</span></code></a></span></dt><dd><p>Whether to parallelize the conversion using multiple threads.</p>
</dd>
<dt><strong>deduplicate_objects</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#False" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">False</span></code></a></span></dt><dd><p>Do not create multiple copies Python objects when created, to save
on memory use. Conversion will be slower.</p>
</dd>
<dt><strong>ignore_metadata</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#False" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">False</span></code></a></span></dt><dd><p>If True, do not use the ‘pandas’ metadata to reconstruct the
DataFrame index, if present</p>
</dd>
<dt><strong>safe</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#True" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">True</span></code></a></span></dt><dd><p>For certain data types, a cast is needed in order to store the
data in a pandas DataFrame or Series (e.g. timestamps are always
stored as nanoseconds in pandas). This option controls whether it
is a safe cast or not.</p>
</dd>
<dt><strong>split_blocks</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#False" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">False</span></code></a></span></dt><dd><p>If True, generate one internal “block” for each column when
creating a pandas.DataFrame from a RecordBatch or Table. While this
can temporarily reduce memory note that various pandas operations
can trigger “consolidation” which may balloon memory use.</p>
</dd>
<dt><strong>self_destruct</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a>, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#False" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">False</span></code></a></span></dt><dd><p>EXPERIMENTAL: If True, attempt to deallocate the originating Arrow
memory while converting the Arrow object to pandas. If you use the
object after calling to_pandas with this option it will crash your
program.</p>
<p>Note that you may not see always memory usage improvements. For
example, if multiple columns share an underlying allocation,
memory can’t be freed until all columns are converted.</p>
</dd>
<dt><strong>types_mapper</strong><span class="classifier">function, default <a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">None</span></code></a></span></dt><dd><p>A function mapping a pyarrow DataType to a pandas ExtensionDtype.
This can be used to override the default pandas type for conversion
of built-in pyarrow types or in absence of pandas_metadata in the
Table schema. The function receives a pyarrow DataType and is
expected to return a pandas ExtensionDtype or <code class="docutils literal notranslate"><span class="pre">None</span></code> if the
default conversion should be used for that type. If you have
a dictionary mapping, you can pass <code class="docutils literal notranslate"><span class="pre">dict.get</span></code> as function.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt><a class="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.Series.html#pandas.Series" title="(in pandas v1.4.0)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pandas.Series</span></code></a> or <a class="reference external" href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v1.4.0)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">pandas.DataFrame</span></code></a> depending on <a class="reference internal" href="#pyarrow.NumericArray.type" title="pyarrow.NumericArray.type"><code class="xref py py-obj docutils literal notranslate"><span class="pre">type</span></code></a> of object</dt><dd></dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.to_pylist">
<span class="sig-name descname"><span class="pre">to_pylist</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.to_pylist" title="Permalink to this definition"></a></dt>
<dd><p>Convert to a list of native Python objects.</p>
<dl class="field-list">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><dl>
<dt><strong>lst</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">list</span></code></a></span></dt><dd></dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.to_string">
<span class="sig-name descname"><span class="pre">to_string</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">int</span> <span class="pre">indent=2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">int</span> <span class="pre">top_level_indent=0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">int</span> <span class="pre">window=10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bool</span> <span class="pre">skip_new_lines=False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.to_string" title="Permalink to this definition"></a></dt>
<dd><p>Render a “pretty-printed” string representation of the Array.</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl>
<dt><strong>indent</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">int</span></code></a>, default 2</span></dt><dd><p>How much to indent the internal items in the string to
the right, by default <code class="docutils literal notranslate"><span class="pre">2</span></code>.</p>
</dd>
<dt><strong>top_level_indent</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">int</span></code></a>, default 0</span></dt><dd><p>How much to indent right the entire content of the array,
by default <code class="docutils literal notranslate"><span class="pre">0</span></code>.</p>
</dd>
<dt><strong>window</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.10)"><code class="docutils literal notranslate"><span class="pre">int</span></code></a></span></dt><dd><p>How many items to preview at the begin and end
of the array when the arrays is bigger than the window.
The other elements will be ellipsed.</p>
</dd>
<dt><strong>skip_new_lines</strong><span class="classifier"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values" title="(in Python v3.10)"><span class="xref std std-ref">bool</span></a></span></dt><dd><p>If the array should be rendered as a single line of text
or if each element should be on its own line.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.tolist">
<span class="sig-name descname"><span class="pre">tolist</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.tolist" title="Permalink to this definition"></a></dt>
<dd><p>Alias of to_pylist for compatibility with NumPy.</p>
</dd></dl>
<dl class="py attribute">
<dt class="sig sig-object py" id="pyarrow.NumericArray.type">
<span class="sig-name descname"><span class="pre">type</span></span><a class="headerlink" href="#pyarrow.NumericArray.type" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.unique">
<span class="sig-name descname"><span class="pre">unique</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.unique" title="Permalink to this definition"></a></dt>
<dd><p>Compute distinct elements in array.</p>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.validate">
<span class="sig-name descname"><span class="pre">validate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">full</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.validate" title="Permalink to this definition"></a></dt>
<dd><p>Perform validation checks. An exception is raised if validation fails.</p>
<p>By default only cheap validation checks are run. Pass <cite>full=True</cite>
for thorough validation checks (potentially O(n)).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>full: bool, default False</strong></dt><dd><p>If True, run expensive checks, otherwise cheap checks only.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Raises</dt>
<dd class="field-even"><dl class="simple">
<dt><code class="xref py py-obj docutils literal notranslate"><span class="pre">ArrowInvalid</span></code></dt><dd></dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.value_counts">
<span class="sig-name descname"><span class="pre">value_counts</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.value_counts" title="Permalink to this definition"></a></dt>
<dd><p>Compute counts of unique elements in array.</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><dl class="simple">
<dt><a class="reference internal" href="pyarrow.StructArray.html#pyarrow.StructArray" title="pyarrow.StructArray"><code class="xref py py-obj docutils literal notranslate"><span class="pre">StructArray</span></code></a></dt><dd><p>An array of &lt;input type “Values”, int64 “Counts”&gt; structs</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt class="sig sig-object py" id="pyarrow.NumericArray.view">
<span class="sig-name descname"><span class="pre">view</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">self</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">target_type</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#pyarrow.NumericArray.view" title="Permalink to this definition"></a></dt>
<dd><p>Return zero-copy “view” of array as another data type.</p>
<p>The data types must have compatible columnar buffer layouts</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl>
<dt><strong>target_type</strong><span class="classifier"><a class="reference internal" href="pyarrow.DataType.html#pyarrow.DataType" title="pyarrow.DataType"><code class="xref py py-obj docutils literal notranslate"><span class="pre">DataType</span></code></a></span></dt><dd><p>Type to construct view as.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl>
<dt><strong>view</strong><span class="classifier"><a class="reference internal" href="pyarrow.Array.html#pyarrow.Array" title="pyarrow.Array"><code class="xref py py-obj docutils literal notranslate"><span class="pre">Array</span></code></a></span></dt><dd></dd>
</dl>
</dd>
</dl>
</dd></dl>
</dd></dl>
</div>
</div>
<!-- Previous / next buttons -->
<div class='prev-next-area'>
<a class='left-prev' id="prev-link" href="pyarrow.NullArray.html" title="previous page">
<i class="fas fa-angle-left"></i>
<div class="prev-next-info">
<p class="prev-next-subtitle">previous</p>
<p class="prev-next-title">pyarrow.NullArray</p>
</div>
</a>
<a class='right-next' id="next-link" href="pyarrow.UInt8Array.html" title="next page">
<div class="prev-next-info">
<p class="prev-next-subtitle">next</p>
<p class="prev-next-title">pyarrow.UInt8Array</p>
</div>
<i class="fas fa-angle-right"></i>
</a>
</div>
</main>
</div>
</div>
<script src="../../_static/scripts/pydata-sphinx-theme.js?digest=1999514e3f237ded88cf"></script>
<footer class="footer mt-5 mt-md-0">
<div class="container">
<div class="footer-item">
<p class="copyright">
&copy; Copyright 2016-2022 Apache Software Foundation.<br>
</p>
</div>
<div class="footer-item">
<p class="sphinx-version">
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 4.4.0.<br>
</p>
</div>
</div>
</footer>
<script type="text/javascript" src="/docs/_static/versionwarning.js"></script> </body>
</html>