跳转到主要内容

pandas数组的Nano实现

项目描述

使用方法,您可以直接 pip install .

如果进行开发,请先安装nanobind

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

然后,您可以使用 python -m pytest ../../tests 从构建文件夹中运行测试套件

使用方法

>>> 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']

注意,我们使用utf8proc进行字符串处理

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

使用清理器进行开发可以工作。请尝试从项目根目录此CMake配置

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/

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源代码分发

此版本没有可用的源代码分发文件。请参阅 生成分发存档 的教程。

构建分发

nanopandas-0.0.dev1-cp312-cp312-win_amd64.whl (276.0 kB 查看哈希值)

上传时间: CPython 3.12 Windows x86-64

nanopandas-0.0.dev1-cp312-cp312-musllinux_1_1_x86_64.whl (644.7 kB 查看哈希值)

上传于 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 查看哈希值)

上传于 CPython 3.12 manylinux: glibc 2.17+ x86-64

nanopandas-0.0.dev1-cp312-cp312-macosx_10_14_x86_64.whl (270.5 kB 查看哈希值)

上传于 CPython 3.12 macOS 10.14+ x86-64

nanopandas-0.0.dev1-cp311-cp311-win_amd64.whl (276.8 kB 查看哈希值)

上传于 CPython 3.11 Windows x86-64

nanopandas-0.0.dev1-cp311-cp311-musllinux_1_1_x86_64.whl (646.2 kB 查看哈希值)

上传于 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 查看哈希值)

上传于 CPython 3.11 manylinux: glibc 2.17+ x86-64

nanopandas-0.0.dev1-cp311-cp311-macosx_10_14_x86_64.whl (270.9 kB 查看哈希值)

上传于 CPython 3.11 macOS 10.14+ x86-64

nanopandas-0.0.dev1-cp310-cp310-win_amd64.whl (276.9 kB 查看哈希值)

上传于 CPython 3.10 Windows x86-64

nanopandas-0.0.dev1-cp310-cp310-musllinux_1_1_x86_64.whl (646.5 kB 查看哈希值)

上传于 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 查看哈希值)

上传于 CPython 3.10 manylinux: glibc 2.17+ x86-64

nanopandas-0.0.dev1-cp310-cp310-macosx_10_14_x86_64.whl (270.9 kB 查看哈希值)

上传于 CPython 3.10 macOS 10.14+ x86-64

nanopandas-0.0.dev1-cp39-cp39-win_amd64.whl (277.3 kB 查看哈希值)

上传于 CPython 3.9 Windows x86-64

nanopandas-0.0.dev1-cp39-cp39-musllinux_1_1_x86_64.whl (646.7 kB 查看哈希值)

上传于 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 查看哈希值)

上传于 CPython 3.9 manylinux: glibc 2.17+ x86-64

nanopandas-0.0.dev1-cp39-cp39-macosx_10_14_x86_64.whl (271.1 kB 查看哈希值)

上传于 CPython 3.9 macOS 10.14+ x86-64

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面