Skip to content

Commit ef00ec3

Browse files
more removing apply in wrangling
1 parent 2601b7e commit ef00ec3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

source/wrangling.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,8 +1560,8 @@ To instead create an entirely new data frame, we can use the `assign` method and
15601560
In this case we want to create one new column named `maximum`, so the argument
15611561
to `assign` begins with `maximum= `.
15621562
Then after the `=`, we specify what the contents of that new column
1563-
should be. In this case we use `apply` just as we did in the previous section to give us the maximum values.
1564-
Remember to specify `axis=1` in the `apply` method so that we compute the row-wise maximum value.
1563+
should be. In this case we use `max` just as we did previously to give us the maximum values.
1564+
Remember to specify `axis=1` in the `max` method so that we compute the row-wise maximum value.
15651565
```{code-cell} ipython3
15661566
:tags: ["output_scroll"]
15671567
region_lang.assign(
@@ -1777,7 +1777,6 @@ burning data science questions!
17771777
| Function | Description |
17781778
| --- | ----------- |
17791779
| `agg` | calculates aggregated summaries of inputs |
1780-
| `apply` | allows you to apply function(s) to multiple columns/rows |
17811780
| `assign` | adds or modifies columns in a data frame |
17821781
| `groupby` | allows you to apply function(s) to groups of rows |
17831782
| `iloc` | subsets columns/rows of a data frame using integer indices |

0 commit comments

Comments
 (0)