Skip to content

Commit

Permalink
Incorporate suggestions from @bkamins
Browse files Browse the repository at this point in the history
  • Loading branch information
tk3369 committed Sep 12, 2020
1 parent 039d139 commit 32b36b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/src/man/comparisons.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ rows having the index value of `'c'`.
| Reduce multiple values | `df['z'].mean(skipna = False)` | `mean(df.z)` |
| | `df['z'].mean()` | `mean(skipmissing(df.z))` |
| | `df[['z']].agg(['mean'])` | `combine(df, :z => mean ∘ skipmissing)` |
| Add new columns | `df.assign(z1 = df['z'] + 1)` | `transform(df, :z => (v -> v .+ 1) => :z1)` |
| Add new columns | `df.assign(z1 = df['z'] + 1)` | `df.z1 = df.z .+ 1` |
| | | `insertcols!(df, :z1 => df.z .+ 1)` |
| | | `transform(df, :z => (v -> v .+ 1) => :z1)` |
| Rename columns | `df.rename(columns = {'x': 'x_new'})` | `rename(df, :x => :x_new)` |
| Pick & transform columns | `df.assign(x_mean = df['x'].mean())[['x_mean', 'y']]` | `select(df, :x => mean, :y)` |
| Sort rows | `df.sort_values(by = 'x')` | `sort(df, :x)` |
Expand Down

0 comments on commit 32b36b3

Please sign in to comment.