MCPcopy
hub / github.com/dask/dask / assign

Function assign

dask/dataframe/methods.py:336–350  ·  view source on GitHub ↗
(df, *pairs)

Source from the content-addressed store, hash-verified

334
335
336def assign(df, *pairs):
337 # Only deep copy when updating an element
338 # (to avoid modifying the original)
339 # Setitem never modifies an array inplace with pandas 1.4 and up
340 pairs = dict(partition(2, pairs))
341 df = df.copy(deep=False)
342 with warnings.catch_warnings():
343 warnings.filterwarnings(
344 "ignore",
345 message="DataFrame is highly fragmented *",
346 category=PerformanceWarning,
347 )
348 for name, val in pairs.items():
349 df[name] = val
350 return df
351
352
353def unique(x, series_name=None):

Callers

nothing calls this directly

Calls 3

partitionFunction · 0.85
copyMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…