thisisnic commented on a change in pull request #11914:
URL: https://github.com/apache/arrow/pull/11914#discussion_r765813835
##########
File path: r/vignettes/python.Rmd
##########
@@ -10,6 +10,11 @@ vignette: >
The `arrow` package provides `reticulate` methods for passing data between
R and Python in the same process. This document provides a brief overview.
+Why you might want to use `pyarrow`?
+* To use a Python functionality, for example: `concat_arrays` function.
+* To transfer Python objects into R, for example Pandas datatrame into R
+ arrow array.
Review comment:
```suggestion
Why you might want to use `pyarrow`?
* To use some Python functionality that is not yet implemented in R, for
example, the `concat_arrays` function.
* To transfer Python objects into R, for example, a Pandas dataframe into an
R Arrow Array.
```
##########
File path: r/vignettes/python.Rmd
##########
@@ -45,7 +55,7 @@ use_virtualenv("arrow-env")
pa <- import("pyarrow")
```
-The package includes support for sharing Arrow `Array` and `RecordBatch`
+The `pyarrow` package includes support for sharing Arrow `Array` and
`RecordBatch`
objects in-process between R and Python. For example, let's create an `Array`
in `pyarrow`.
Review comment:
```suggestion
in pyarrow.
```
##########
File path: r/vignettes/python.Rmd
##########
@@ -76,10 +86,10 @@ a[a > 1]
## ]
```
-We can send data both ways. One reason we might want to use `pyarrow` in R is
+You can send data both ways. One reason you might want to use `pyarrow` in R is
to take advantage of functionality that is better supported in Python than in
R.
For example, `pyarrow` has a `concat_arrays` function, but as of 0.17, this
-function is not implemented in the `arrow` R package. We can use `reticulate`
+function is not implemented in the `arrow` R package. You can use `reticulate`
Review comment:
```suggestion
function is not implemented in the arrow R package. You can use reticulate
```
##########
File path: r/vignettes/python.Rmd
##########
@@ -101,13 +111,24 @@ a_and_b
## ]
```
-Now we have a single `Array` in R.
+Now you have a single `Array` in R.
Review comment:
```suggestion
Now you have a single Array in R.
```
##########
File path: r/vignettes/python.Rmd
##########
@@ -45,7 +55,7 @@ use_virtualenv("arrow-env")
pa <- import("pyarrow")
```
-The package includes support for sharing Arrow `Array` and `RecordBatch`
+The `pyarrow` package includes support for sharing Arrow `Array` and
`RecordBatch`
Review comment:
```suggestion
The pyarrow package includes support for sharing Arrow `Array` and
`RecordBatch`
```
##########
File path: r/vignettes/python.Rmd
##########
@@ -28,6 +33,11 @@ add `nightly = TRUE`:
install_pyarrow("arrow-env", nightly = TRUE)
```
+A virtualenv or a virtual environment is a specific Python installation
+created for one project or purpose. It is a good practice to use
+specific environments in Python so that updating a package doesn't
+impact packages in other projects.
Review comment:
Love this!
##########
File path: r/vignettes/python.Rmd
##########
@@ -10,6 +10,11 @@ vignette: >
The `arrow` package provides `reticulate` methods for passing data between
Review comment:
```suggestion
The arrow package provides
[reticulate](https://rstudio.github.io/reticulate/) methods for passing data
between
```
##########
File path: r/vignettes/python.Rmd
##########
@@ -76,10 +86,10 @@ a[a > 1]
## ]
```
-We can send data both ways. One reason we might want to use `pyarrow` in R is
+You can send data both ways. One reason you might want to use `pyarrow` in R is
to take advantage of functionality that is better supported in Python than in
R.
For example, `pyarrow` has a `concat_arrays` function, but as of 0.17, this
Review comment:
```suggestion
For example, pyarrow has a `concat_arrays()` function, but as of 0.17, this
```
##########
File path: r/vignettes/python.Rmd
##########
@@ -76,10 +86,10 @@ a[a > 1]
## ]
```
-We can send data both ways. One reason we might want to use `pyarrow` in R is
+You can send data both ways. One reason you might want to use `pyarrow` in R is
Review comment:
```suggestion
You can send data both ways. One reason you might want to use pyarrow in R is
```
##########
File path: r/vignettes/python.Rmd
##########
@@ -62,8 +72,8 @@ a
## ]
```
-`a` is now an `Array` object in our R session, even though we created it in
Python.
-We can apply R methods on it:
+`a` is now an `Array` object in our R session, even though you created it in
Python.
Review comment:
```suggestion
`a` is now an `Array` object in your R session, even though you created it
in Python.
```
##########
File path: r/vignettes/python.Rmd
##########
@@ -101,13 +111,24 @@ a_and_b
## ]
```
-Now we have a single `Array` in R.
+Now you have a single `Array` in R.
+
+## How this works
"Send", however, isn't the correct word. Internally, we're passing pointers to
the data between the R and Python interpreters running together in the same
process, without copying anything. Nothing is being sent: we're sharing and
accessing the same internal Arrow memory buffers.
+## Arrow object types
+
+For more information about Arrow object types see the Internals section of
+the Arrow vignette by calling:
Review comment:
```suggestion
the "arrow" vignette:
```
##########
File path: r/vignettes/python.Rmd
##########
@@ -101,13 +111,24 @@ a_and_b
## ]
```
-Now we have a single `Array` in R.
+Now you have a single `Array` in R.
+
+## How this works
"Send", however, isn't the correct word. Internally, we're passing pointers to
the data between the R and Python interpreters running together in the same
process, without copying anything. Nothing is being sent: we're sharing and
accessing the same internal Arrow memory buffers.
+## Arrow object types
+
+For more information about Arrow object types see the Internals section of
Review comment:
```suggestion
For more information about Arrow object types see the "Internals" section of
```
--
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]