Skip to content

Instantly share code, notes, and snippets.

@Coldsp33d
Last active December 9, 2019 03:51

Revisions

  1. Coldsp33d renamed this gist Dec 9, 2019. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions gistfile1.txt → inplace_funcs.txt
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,15 @@
    # Reference: https://github.com/pandas-dev/pandas/issues/16529

    (Series/DataFrame).drop
    (Series/DataFrame).drop_duplicates
    (Series/DataFrame).dropna
    DataFrame.set_index (with drop=False wouldn't change the data, but that doesn't seem the main use case)
    DataFrame.query
    DataFrame.eval
    Not sure:


    (Series/DataFrame).sort_values
    (Series/DataFrame).sort_index
    Should be able to not copy memory (under discussion on what to do):

    (Series/DataFrame).clip
    (Series/DataFrame).where
    @@ -26,10 +26,8 @@ Index.set_names
    MultiIndex.set_levels
    MultiIndex.set_labels
    pandas.core.resample.Resampler.interpolate
    Special cases:

    pandas.eval (with inplace=False the value is not returned but set to an argument target)
    Will be fully deprecated, so doesn't matter:

    (Series/DataFrame/Panel).clip_lower
    (Series/DataFrame/Panel).clip_upper
  2. Coldsp33d created this gist Dec 9, 2019.
    39 changes: 39 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    # Reference: https://github.com/pandas-dev/pandas/issues/16529
    (Series/DataFrame).drop
    (Series/DataFrame).drop_duplicates
    (Series/DataFrame).dropna
    DataFrame.set_index (with drop=False wouldn't change the data, but that doesn't seem the main use case)
    DataFrame.query
    DataFrame.eval
    Not sure:

    (Series/DataFrame).sort_values
    (Series/DataFrame).sort_index
    Should be able to not copy memory (under discussion on what to do):

    (Series/DataFrame).clip
    (Series/DataFrame).where
    (Series/DataFrame).{fillna, ffill, bfill}
    (Series/DataFrame).rename_axis
    (Series/DataFrame).reset_index
    (Series/DataFrame).replace
    (Series/DataFrame).set_axis
    (Series/DataFrame).mask
    (Series/DataFrame).interpolate
    DataFrame.rename
    Index.rename
    Index.set_names
    MultiIndex.set_levels
    MultiIndex.set_labels
    pandas.core.resample.Resampler.interpolate
    Special cases:

    pandas.eval (with inplace=False the value is not returned but set to an argument target)
    Will be fully deprecated, so doesn't matter:

    (Series/DataFrame/Panel).clip_lower
    (Series/DataFrame/Panel).clip_upper
    pandas.Panel.clip
    pandas.Panel.drop
    pandas.Panel.dropna
    pandas.Panel.sort_index