"Tools for using NumPy, Pandas and PyArrow with MongoDB"
Project description
- Info:
A companion library to PyMongo that makes it easy to move data between MongoDB and Apache Arrow. See GitHub for the latest source.
- Documentation:
Available at mongo-arrow.readthedocs.io.
PyMongoArrow is a companion library to PyMongo that contains tools for loading MongoDB query result sets as Apache Arrow tables, Pandas DataFrames or NumPy arrays.
>>> from pymongoarrow.monkey import patch_all
>>> patch_all()
>>> from pymongoarrow.api import Schema
>>> schema = Schema({'_id': int, 'qty': float})
>>> from pymongo import MongoClient
>>> client = MongoClient()
>>> client.db.data.insert_many([{'_id': 1, 'qty': 25.4}, {'_id': 2, 'qty': 16.9}, {'_id': 3, 'qty': 2.3}])
>>> data_frame = client.db.test.find_pandas_all({}, schema=schema)
>>> data_frame
_id qty
0 1 25.4
1 2 16.9
2 3 2.3
>>> arrow_table = client.db.test.find_arrow_all({}, schema=schema)
>>> arrow_table
pyarrow.Table
_id: int64
qty: double
>>> ndarrays = client.db.test.find_numpy_all({}, schema=schema)
>>> ndarrays
{'_id': array([1, 2, 3]), 'qty': array([25.4, 16.9, 2.3])}
PyMongoArrow is the recommended way to materialize MongoDB query result sets as contiguous-in-memory, typed arrays suited for in-memory analytical processing applications.
Installing PyMongoArrow
PyMongoArrow is available on PyPI:
$ python -m pip install pymongoarrow
To use PyMongoArrow with MongoDB Atlas’ mongodb+srv:// URIs, you will need to also install PyMongo with the srv extra:
$ python -m pip install 'pymongo[srv]' pymongoarrow
To use PyMongoArrow APIs that return query result sets as pandas DataFrame instances, you will also need to have the pandas package installed:
$ python -m pip install pandas
Development Install
See the instructions on Read the Docs.
Documentation
Full documentation is available on Read the Docs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pymongoarrow-0.2.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89fbd52d7ae429167647e72f521e7627bc2352b1ba7dca4d37f29450332c335d |
|
MD5 | 96482e98dc76ddcfb73bb9b77af53c88 |
|
BLAKE2b-256 | 7e584aea2ea6d800e9e3bda6064385a768027570be8290e871b164532c3bef72 |
Hashes for pymongoarrow-0.2.0-cp310-cp310-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 782ce45692e3f79083c59569d93abd0b446b3695b0f0db3b1526b61281d46873 |
|
MD5 | 4eba30c5851a8459ec3d1d6c12011733 |
|
BLAKE2b-256 | aeb896ddc668d011d2cc66371be388dae237521e158a35dee6c9f28c266090b1 |
Hashes for pymongoarrow-0.2.0-cp310-cp310-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 567347a71664150165091a5906246dcccdba790ad5ef86fb0c8830922e6cb98b |
|
MD5 | 5c3b88a04cf8669cc78f7d9920bb8d9b |
|
BLAKE2b-256 | b55e28fe933f9d559884c7688e0ae397d3fea981035b54af78a689a128c11a06 |
Hashes for pymongoarrow-0.2.0-cp310-cp310-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9be9e8b162ab7d675792e561d4f9bb67e675c26ac3bbd829f009a3efa1657fd8 |
|
MD5 | a3e501469ee3779b91f585360aa8c9fd |
|
BLAKE2b-256 | d3c89e54d7ca1f44a0ea1fc5061fdd7bba13bb4df1b635e9a1629fe2a4503c34 |
Hashes for pymongoarrow-0.2.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 065f300003a4c475f820134f40d99ad08e7516ac95979f1e63250447307e6cee |
|
MD5 | e32e5ae598cb3a169637b466ecd94613 |
|
BLAKE2b-256 | 189aba9aa26f29ee1d56048dfbbb46889705a0cf9b6c6d77d358d6380716897b |
Hashes for pymongoarrow-0.2.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 423ac965214d3a65b3562de4d66b9f139929f447b04080f97ea4bb6912e35db9 |
|
MD5 | d41e380f98843fa328be6f85f2e22449 |
|
BLAKE2b-256 | f794d86098730100f93e33651a6b7c93003b8738918d22da313ffdc2c5aa7163 |
Hashes for pymongoarrow-0.2.0-cp39-cp39-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96e0d980ee6753a7a1187dedc680aa05a75bed4c80586b0df0dcee6317007ce9 |
|
MD5 | 82c428457b0e5b5afbbe71bfbe87af18 |
|
BLAKE2b-256 | 28879de8478942ebeecabacf0a67c2575b676bf43d2883dd1a7a02bfc23577e6 |
Hashes for pymongoarrow-0.2.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddd25a095699fcb67db32c796dcf5da3817502307e99a8cbb7fe1e7e0de8f9f2 |
|
MD5 | f519926bab2617559f55af74cc2f3518 |
|
BLAKE2b-256 | bf733b4884e89c79e7d33603474a43794c1178b75c5fda70d2d57c7d92d7db43 |
Hashes for pymongoarrow-0.2.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d7df3b6bd345ba5d6430e67b0cc1af45067e4b489220c3ec8b95288cf10281d |
|
MD5 | c2eedccb7c3a506955d78f9441ca14c8 |
|
BLAKE2b-256 | f5cbb3a06a10638407abb062bb49ac1f75cf9b0951655148dab7e450b08d8c45 |
Hashes for pymongoarrow-0.2.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b23aae4158060df0224b27a0ffd09fb74391dc3506af9652ced9283dce10ea20 |
|
MD5 | 5975d5564a3de0396137c62ecfb18798 |
|
BLAKE2b-256 | c27f380be48a92c53e98e6bc5ac8610be8777471dadef5e778c4d2d2477c2264 |
Hashes for pymongoarrow-0.2.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c55f3e13a7f9e271d893641310ac84b75d180c9bc3e21f2e1bc311b795367d1 |
|
MD5 | 0876765b28a815e41c4e16c2df75ff40 |
|
BLAKE2b-256 | 4a24d7f36b02a72027f181157f59426096ab084ccab52e3ed7a19f96e0ec38ec |
Hashes for pymongoarrow-0.2.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06a332db33ffd0975e5cb7c7c09823ab8ead947074e01dc8e3144308dcc22bc1 |
|
MD5 | 1f1b72afba9526c05c4435f90011a17c |
|
BLAKE2b-256 | 3f45aba6738065246cd92190433e48697ac8351e2a47c9999a85b28a206a4f86 |
Hashes for pymongoarrow-0.2.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f459520bc3f806f1c0be54d5a3f01c69f2412be483a3a554174211d83a135166 |
|
MD5 | 92f086c1584415a402d36683d4f18fe8 |
|
BLAKE2b-256 | 582c3ff5b00437f6f779f5da8a19e039f8bb8ec18b24970e2eaa5776b069f12e |
Hashes for pymongoarrow-0.2.0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c514271914d1a122cab6671d48f0d04770a3f21496be087eb2a994a01ec3e985 |
|
MD5 | ff30ee0b73500fd2fd32f50574efb56c |
|
BLAKE2b-256 | 74083e2fd1089f3252fb2f2acb21a74bba7f21e9c749230b94b08b7005c96661 |
Hashes for pymongoarrow-0.2.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d12dd185d176f6b672f6fc1d7c3820417b2aeb1f6cda73333a1019579463c9b8 |
|
MD5 | bd64b2f9e2f2c9955080aeb01497d141 |
|
BLAKE2b-256 | d1f66ab1e719148adb811f1a81f017e76b8a60f249e163308e1c7184cd9dd635 |
Hashes for pymongoarrow-0.2.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a09d868f4b2ca75300ae8b0c5dbb237661bb4a7b047592c9acba3b076afbd2f |
|
MD5 | cf1c255b581a0c9c61924b3cb8419c25 |
|
BLAKE2b-256 | f03f0efe19dc842111d192590899a94b7cbb5d928b1652804e44f5dfc50f300a |
Hashes for pymongoarrow-0.2.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97bc91625b39343cc1c4bc9b6e27e2d21b060d79faf5c5649f667da47690ab0c |
|
MD5 | d6de73c6a2b0df73221059df07a10187 |
|
BLAKE2b-256 | ad94a5f65bc7dec3e4bb853ec6798f267c8f0339b2bd90d92bdee29bd1bc8c5b |
Hashes for pymongoarrow-0.2.0-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd589fed061369a9fb3a9f7413fdf4cd69c8ba3dc3d314b9f146b4d1b513ae6a |
|
MD5 | 486345ec4f8f6640768a00df31e33084 |
|
BLAKE2b-256 | 52c9e0f905de1f0393fb029ca5ddadac8c106770ef5397c2a384ba6ac0f09c96 |
Hashes for pymongoarrow-0.2.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e308eb318ffb67129d8c143426b910bcf3c1203d6387d66cf27685893f1346c8 |
|
MD5 | 9ac64d2b5334a7ba9073330a42ddc120 |
|
BLAKE2b-256 | b9f4eda69afbdc1680b3401abbdc9a023669eb3dcbcd885454d0183eef9bfced |
Hashes for pymongoarrow-0.2.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c27a506841e7b49a68da8b482f745166c021c96b818b15993aed93028f5bc188 |
|
MD5 | 7b20ca70c7d6cd5a8785a2cc68e04c4d |
|
BLAKE2b-256 | a0f1294712ff2a368960ac27e4eece547c49d679458b62de96421cf5684e4de5 |