Skip to content

Commit

Permalink
doc(): to_numpy advice for when working with Utf8 (#3072)
Browse files Browse the repository at this point in the history
  • Loading branch information
dandxy89 committed Apr 12, 2022
1 parent ecf338f commit a7e27b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions py-polars/polars/internals/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,10 @@ def to_numpy(self) -> np.ndarray:
Convert DataFrame to a 2d numpy array.
This operation clones data.
Notes
-----
If you're attempting to convert Utf8 to an array you'll need to install `pyarrow`.
Examples
--------
Expand Down
4 changes: 4 additions & 0 deletions py-polars/polars/internals/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2102,6 +2102,10 @@ def to_numpy(
If you want a zero-copy view and know what you are doing, use `.view()`.
Notes
-----
If you are attempting to convert Utf8 to an array you'll need to install `pyarrow`.
Examples
--------
>>> s = pl.Series("a", [1, 2, 3])
Expand Down

0 comments on commit a7e27b0

Please sign in to comment.