Arrow
Apache Arrow is a cross-language development platform for in-memory data. It uses a standardized language-independent columnar memory format for flat and hierarchical data, organised for efficient analytic operations. It also provides computational libraries and zero-copy streaming messaging and interprocess communication. Languages currently supported include C, C++, C#, Go, Java, JavaScript, MATLAB, Python, R, Ruby, and Rust.
CUDA¶
Arrow is also available with CUDA.
whereX.Y.Z represents the desired version.
Python bindings¶
The module contains bindings for multiple Python versions. To discover which are the compatible Python versions, run:
whereX.Y.Z represents the desired version.
Or search for pyarrow directly, by running:
PyArrow¶
The Arrow Python bindings (also named PyArrow) have first-class integration with NumPy, Pandas, and built-in Python objects. They are based on the C++ implementation of Arrow.
-
Load the required modules.
whereX.Y.Zrepresents the desired version. -
Import PyArrow.
If the command displays nothing, the import was successful.
For more information, see the Arrow Python documentation.
Fulfilling other Python package dependencies¶
Other Python packages depend on PyArrow in order to be installed. With the arrow module loaded, your package dependency for pyarrow will be satisfied.
If pip list shows an entry, then pyarrow is available and seen by pip. Otherwise, if there is no entry, pyarrow is not available.
Apache Parquet format¶
The Parquet file format is available.
To import the Parquet module, execute the previous steps for pyarrow, then run:
R bindings¶
The Arrow package exposes an interface to the Arrow C++ library to access many of its features in R. This includes support for analysing large, multi-file datasets (open_dataset()), working with individual Parquet files (read_parquet(), write_parquet()) and Feather files (read_feather(), write_feather()), as well as lower-level access to the Arrow memory and messages.
Installation¶
-
Load the required modules.
-
Specify the local installation directory.
-
Export the required variables to ensure you are using the system installation.
-
Install the bindings.
Usage¶
After the bindings are installed, they have to be loaded.
-
Load the required modules.
-
Load the library.
Output:
For more information, see the Arrow R documentation.
Troubleshooting¶
This is a normal error generated by this dummy wheel.¶
See the Dummy wheel page.
ModuleNotFoundError: No module named 'pyarrow'¶
When importing pyarrow, one may get the following error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pyarrow'
Module Arrow not loaded¶
Find a compatible arrow module and load it. See PyArrow.
Python module not loaded¶
When omitting to load a Python module, and activating a virtual environment, the Python bindings will not be available, hence resulting in pyarrow not being seen.
Solution:¶
-
Deactivate the Python virtual environment.
!!! note If you had a virtual environment activated, it is important to deactivate it first, then load the module, before reactivating the virtual environment. -
Load the module.
-
Check that it is visible by
Output: and is accessible for your currently loaded Python module: If no errors are raised, then everything is OK!pip: