mongodb-labs / mongo-arrow

MongoDB integrations for Apache Arrow. Export MongoDB documents to numpy array, parquet files, and pandas dataframes in one line of code.
https://mongo-arrow.readthedocs.io
Apache License 2.0
92 stars 14 forks source link

Code fence syntax highlight in readme #205

Closed janosh closed 7 months ago

janosh commented 7 months ago

quick clarifying question if i may: is this library solely concerned with reading? it does not handle numpy type conversion to BSON on DB write?

context: it appears numpy.bool_ fails to BSON-serialize with numpy v2 https://github.com/materialsproject/fireworks/issues/522

janosh commented 7 months ago

pre-commit should be green now.

thanks for the quick reply, good to know about write! is there some function that recursively converts a dict containing numpy/pandas types to std lib Python types?

ShaneHarvey commented 7 months ago

Yes, you can see it here: https://github.com/mongodb-labs/mongo-arrow/blob/1.3.0/bindings/python/pymongoarrow/api.py#L417