clip inplace? · Issue #15388 · pandas-dev/pandas (original) (raw)
Is it possible to support clip in place, just like numpy does? I assume that would speed up working with large dataframe/series as no extra copies will be needed.
If not, is that a workaround to achieve the same effect? I tried np.clip(df.values,-clip_bounds.values, clip_bounds.values, out=df.values)
, but realized that df.values is actually an expensive call as it is merging blocks underneath.