We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
from_pandas
1 parent 53913e0 commit 7a39d1eCopy full SHA for 7a39d1e
py-polars/polars/convert/general.py
@@ -628,7 +628,12 @@ def from_pandas(
628
"""
629
Construct a Polars DataFrame or Series from a pandas DataFrame, Series, or Index.
630
631
- This operation clones data.
+ This operation may clone data. If you want to ensure that in-place modifications
632
+ of the output don't affect the input, you may want to consider one of the following:
633
+
634
+ - Enable `Copy-On-Write <https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html>`_
635
+ in pandas.
636
+ - Call :meth:`DataFrame.clone` on the output of `from_pandas`.
637
638
This requires that :mod:`pandas` and :mod:`pyarrow` are installed.
639
0 commit comments