Skip to main content

Arrpy

A lightweight module allowing simple manipulation of 2D arrays using base python list objects. Designed for use in pandas-incompatible situations, such as when working in Jython. Allows import and export of spreadsheets, finding the mean across rows or columns, and row extraction.

download

run 'pip install arrpy'

Import and export

open_df(file, delim_type = "csv", subarray = "col", e = 'utf-8-sig') Open file and return a corresponding list of lists. file is a string denoting the path of the 2D data of interest. delim type is a string denoting the column separators used in file. Currently accepts "csv" and "tab". subarray is a string denoting whether the respective subarrays in the list created will correspond to a row or a columns of file. e is a string denoting the encoding of the file.

write_csv(arr, path, subarray = "col") Write arr to file. arr is a list of lists. file is a string denoting the path to write to. subarray is a string denoting whether the respective subarrays in arr will correspond to a row or column of file.

List manipulation

append_row(arr, row, base_check = True, deep = True) Output a new list object with row appended to arr. arr is a list of lists. row is a list to append to arr. base_check is a boolean to determine whether to run a set of basic compatibilty checks on arr (type, length, dimension count, and raggedness) deep is a boolean to determine whether to append row to a deep (True) or shallow copy of arr (False).

del_row(arr, row, base_check = True) Output a new list object with row deleted from arr. arr is a list of lists. row is an object that is coercible to 0 <= int <= len(arr[0]). base_check is a boolean to determine whether to run a set of basic compatibilty checks on arr (type, length, dimension count, and raggedness)

List processing

avg_col(arr, base_check = True, dim_check = False) Outputs the arithmetic mean of the columns (subarrays) of arr as a list. arr is a list of lists. base_check is a boolean to determine whether to run a set of basic compatibilty checks on arr (type, length, dimension count, and raggedness) dim_check is a boolean to determine whether to check if arr has a consistent number of dimensions. This can be slow for larger arr.

avg_row(arr, base_check = True, dim_check = False) Outputs the arithmetic mean of the rows (a given index of each subarray) of arr as a list. arr is a list of lists. base_check is a boolean to determine whether to run a set of basic compatibilty checks on arr (type, length, dimension count, and raggedness) dim_check is a boolean to determine whether to check if arr has a consistent number of dimensions. This can be slow for larger arr.

row_extract(arr, row, base_check = True) Outputs the selected row (given index of each subarray of arr) as a list. arr is a list of lists. row is an object that is coercible to 0 <= int <= len(arr[0]). base_check is a boolean to determine whether to run a set of basic compatibilty checks on arr (type, length, dimension count, and raggedness) dim_check is a boolean to determine whether to check if arr has a consistent number of dimensions. This can be slow for larger arr.

Metadata

Release files for arrpy 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arrpy 1.0.0
File Size Uploaded
arrpy-1.0.0.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arrpy 1.0.0
File Interpreter ABI Platform
arrpy-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.5 kB

Release files / arrpy-1.0.0.tar.gz

Download URL arrpy-1.0.0.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ba6fdf8ca614694d4dd1733b6c64cab5038c40bbcb9cf76fe4f6b37497b31a11
BLAKE2b-256 checksum
How to use checksums
e48c9dc4ae6868eef42314cf76ce7cec90543bbe284c10ae93ec8a5b3e3534d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release files / arrpy-1.0.0-py3-none-any.whl

Download URL arrpy-1.0.0-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9eda9669481720653adea6a69b28ece3ba1ca0b53386a7fd3524ae0bee192b18
BLAKE2b-256 checksum
How to use checksums
de5d532f7ca9599e0b5ad080c9f7e3af5f1815da49f05e4047d5efbc669ee625
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page