Overview

docs

Documentation Status

tests

Travis-CI Build Status
Coverage Status Coverage Status

package

PyPI Package latest release PyPI Wheel Supported versions Supported implementations
Commits since latest release

This package allows you to read/write pandas dataframes in MongoDB in the simplest way possible.

  • Free software: MIT license

Quick Start

Writing a pandas DataFrame to a MongoDB collection:

import pdmongo as pdm
import pandas as pd

df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
df = pdm.read_mongo("MyCollection", [], "mongodb://localhost:27017/mydb")
df.to_mongo(df, collection, uri)

Reading a MongoDB collection into a pandas DataFrame:

import pdmongo as pdm
df = pdm.read_mongo("MyCollection", [], "mongodb://localhost:27017/mydb")
print(df)

Installation

pip install pdmongo

You can also install the in-development version with:

pip install https://github.com/pakallis/python-pandas-mongo/archive/master.zip

Development

To run the all tests run:

tox

Note, to combine the coverage data from all the tox environments run:

Windows

set PYTEST_ADDOPTS=--cov-append
tox

Other

PYTEST_ADDOPTS=--cov-append tox