From f1ad5fb30394d727619b9fc26dd0ebdcb0a1465c Mon Sep 17 00:00:00 2001 From: Lee Stott Date: Sat, 6 Sep 2025 16:17:20 +0100 Subject: [PATCH] Update 2-Working-With-Data/07-python/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- 2-Working-With-Data/07-python/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-Working-With-Data/07-python/README.md b/2-Working-With-Data/07-python/README.md index 4a2974a1..18434aa6 100644 --- a/2-Working-With-Data/07-python/README.md +++ b/2-Working-With-Data/07-python/README.md @@ -173,7 +173,7 @@ df.iloc[:5] **Grouping** is often used to get a result similar to *pivot tables* in Excel. Suppose that we want to compute mean value of column `A` for each given number of `LenB`. Then we can group our DataFrame by `LenB`, and call `mean`: ```python -df.groupby(by='LenB').[['A','DivA']]mean() +df.groupby(by='LenB')[['A','DivA']].mean() ``` If we need to compute mean and the number of elements in the group, then we can use more complex `aggregate` function: ```python