pitrou commented on a change in pull request #12698:
URL: https://github.com/apache/arrow/pull/12698#discussion_r836535154
##########
File path: python/pyarrow/_dataset.pyx
##########
@@ -700,17 +700,43 @@ cdef class FileFormat(_Weakrefable):
return self.wrapped
def inspect(self, file, filesystem=None):
- """Infer the schema of a file."""
+ """
+ Infer the schema of a file.
+
+ Parameters
+ ----------
+ file : file-like object, path-like or str
+ The file or file path to infer a schema from.
+ filesystem : Filesystem, optional
+ If `filesystem` is given, `file` must be a string and specifies
+ the path of the file to read from the filesystem.
+
+ Returns
+ -------
+ schema : Schema
+ The schema inferred from the file
+ """
c_source = _make_file_source(file, filesystem)
c_schema = GetResultValue(self.format.Inspect(c_source))
return pyarrow_wrap_schema(move(c_schema))
def make_fragment(self, file, filesystem=None,
Expression partition_expression=None):
"""
- Make a FileFragment of this FileFormat. The filter may not reference
- fields absent from the provided schema. If no schema is provided then
- one will be inferred.
+ Make a FileFragment from a given file.
+
+ The filter may not reference fields absent from the provided schema.
+ If no schema is provided then one will be inferred.
Review comment:
Will change indeed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]