Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1765

Add support for loading/saving data into pandas DataFrame

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: API
    • Labels:
      None

      While it's easily possible to load and save in dict form and convert dicts to pandas DataFrames, it is quite slow, by bypassing BSON > dict conversion and going straight from BSON > DataFrame there is great memory and performance benefits.

      I have seen this guide on how to load data to pandas although this has 2 caveats, it isn't native, and there isn't an alternative for saving using pandas. 

      There is a default_class argument for MongoClient, although this is restricted to MappedCollection.

       

      I've also seen Monary but this has no support for string types and while not under active development for 4+ years I'm unsure the compatibility with the newest version of Pymongo.

            Assignee:
            prashant.mital Prashant Mital (Inactive)
            Reporter:
            jabby Justin Bacher
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: