Skip to main content

Nano implementation of pandas arrays

Project description

For usage you can simply pip install .

If developing install nanobind then:

cmake -S . -B build
cmake --build build
cd build/src

You can then run the test suite from the build folder with python -m pytest ../../tests

Usage:

>>> import nanopandas as nanopd
>>> arr = nanopd.StringArray(["foo", "bar", "baz", "baz", None])
>>> arr.size
5
>>> arr.nbytes
48
>>> arr.dtype
'large_string[nanoarrow]'
>>> arr.to_pylist()
['foo', 'bar', 'baz', 'baz', None]
>>> arr.unique().to_pylist()
['bar', 'baz', 'foo']

Note that we use utf8proc for string handling:

>>> import nanopandas as nanopd
>>> arr = nanopd.StringArray(["üàéµ"])
>>> arr.upper().to_pylist()
['ÜÀÉΜ']
>>> arr.capitalize().to_pylist()
['Üàéµ']

Developing with sanitizers can work. Try this cmake config from the project root:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DUSE_SANITIZERS=ON
cmake --build build
cd build/src
ASAN_OPTIONS="detect_leaks=0" LD_PRELOAD="$(gcc -print-file-name=libasan.so)" python -m pytest -s ../../tests/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

nanopandas-0.0.dev1-cp312-cp312-win_amd64.whl (276.0 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

nanopandas-0.0.dev1-cp312-cp312-musllinux_1_1_x86_64.whl (644.7 kB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

nanopandas-0.0.dev1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (318.7 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

nanopandas-0.0.dev1-cp312-cp312-macosx_10_14_x86_64.whl (270.5 kB view hashes)

Uploaded CPython 3.12 macOS 10.14+ x86-64

nanopandas-0.0.dev1-cp311-cp311-win_amd64.whl (276.8 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

nanopandas-0.0.dev1-cp311-cp311-musllinux_1_1_x86_64.whl (646.2 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

nanopandas-0.0.dev1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (321.3 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

nanopandas-0.0.dev1-cp311-cp311-macosx_10_14_x86_64.whl (270.9 kB view hashes)

Uploaded CPython 3.11 macOS 10.14+ x86-64

nanopandas-0.0.dev1-cp310-cp310-win_amd64.whl (276.9 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

nanopandas-0.0.dev1-cp310-cp310-musllinux_1_1_x86_64.whl (646.5 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

nanopandas-0.0.dev1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (321.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

nanopandas-0.0.dev1-cp310-cp310-macosx_10_14_x86_64.whl (270.9 kB view hashes)

Uploaded CPython 3.10 macOS 10.14+ x86-64

nanopandas-0.0.dev1-cp39-cp39-win_amd64.whl (277.3 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

nanopandas-0.0.dev1-cp39-cp39-musllinux_1_1_x86_64.whl (646.7 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

nanopandas-0.0.dev1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (321.8 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

nanopandas-0.0.dev1-cp39-cp39-macosx_10_14_x86_64.whl (271.1 kB view hashes)

Uploaded CPython 3.9 macOS 10.14+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page