8000 DOC: Adding Docstring to using_copy_on_write #15580 by wcgonzal · Pull Request #53151 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DOC: Adding Docstring to using_copy_on_write #15580 #53151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Updated DocString
  • Loading branch information
wcgonzal committed May 9, 2023
commit c4fc0e4326f77eca59afb915030f7ff5adbafb7e
7 changes: 3 additions & 4 deletions pandas/_config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@

def using_copy_on_write() -> bool:
"""
Determine if copy-on-write mode is being used.
Determine if copy-on-write mode is enabled.

This function examines the global pandas configuration settings.
Copy-on-write is a memory-saving technique that avoids copying data
until it is actually modified, which can be particularly useful when
working with large datasets.
Expand All @@ -47,10 +46,10 @@ def using_copy_on_write() -> bool:

Example
-------
>>> pd.set_option('mode.copy', True)
>>> pd.set_option("mode.copy_on_write", True)
>>> using_copy_on_write()
True
>>> pd.set_option('mode.copy', False)
>>> pd.set_option("mode.copy_on_write", False)
>>> using_copy_on_write()
False
"""
Expand Down
0