Skip to content

Commit c61b70b

Browse files
committed
Add _copy_cols flag to table
1 parent 6ea5243 commit c61b70b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

xdeps/table.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def __init__(
201201
cast_strings=True,
202202
regex_flags=re.IGNORECASE,
203203
verify=True,
204+
_copy_cols=False,
204205
):
205206
if verify:
206207
_data = data.copy()
@@ -245,6 +246,11 @@ def __init__(
245246
for kk, vv in init.items():
246247
object.__setattr__(self, kk, vv)
247248

249+
if _copy_cols:
250+
self._data = self._data.copy()
251+
for kk in self._col_names:
252+
self._data[kk] = self._data[kk].copy()
253+
248254
@property
249255
def mask(self):
250256
raise DeprecationWarning(

0 commit comments

Comments
 (0)