File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ DataFrames or NumPy arrays.
28
28
1 2 16.9
29
29
2 3 2.3
30
30
>> > arrow_table = client.db.test.find_arrow_all({}, schema = schema)
31
+ # The schema may also be omitted
32
+ >> > arrow_table = client.db.test.find_arrow_all({})
31
33
>> > arrow_table
32
34
pyarrow.Table
33
35
_id: int64
Original file line number Diff line number Diff line change @@ -58,8 +58,9 @@ query. We can do so using **PyMongo**::
58
58
59
59
Defining the schema
60
60
-------------------
61
- **PyMongoArrow ** relies upon a **user-specified ** data schema to marshall
62
- query result sets into tabular form. Users can define the schema by
61
+ **PyMongoArrow ** relies upon a data schema to marshall
62
+ query result sets into tabular form. This schema can either be automatically inferred from the data,
63
+ or provided by the user. Users can define the schema by
63
64
instantiating :class: `pymongoarrow.api.Schema ` using a mapping of field names
64
65
to type-specifiers, e.g.::
65
66
@@ -70,6 +71,15 @@ There are multiple permissible type-identifiers for each supported BSON type.
70
71
For a full-list of supported types and associated type-identifiers see
71
72
:doc: `supported_types `.
72
73
74
+ .. note ::
75
+
76
+ For all of the examples below, the schema can be omitted like so::
77
+
78
+ arrow_table = client.db.data.find_arrow_all({'amount': {'$gt': 0}})
79
+
80
+ In this case, PyMongoArrow will try to automatically apply a schema based on
81
+ the data contained in the first batch.
82
+
73
83
Find operations
74
84
---------------
75
85
We are now ready to query our data. Let's start by running a ``find ``
You can’t perform that action at this time.
0 commit comments