Skip to content

Commit f1ad5fb

Browse files
leestottCopilot
andauthored
Update 2-Working-With-Data/07-python/README.md
Co-authored-by: Copilot <[email protected]>
1 parent a36ac76 commit f1ad5fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2-Working-With-Data/07-python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ df.iloc[:5]
173173

174174
**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`:
175175
```python
176-
df.groupby(by='LenB').[['A','DivA']]mean()
176+
df.groupby(by='LenB')[['A','DivA']].mean()
177177
```
178178
If we need to compute mean and the number of elements in the group, then we can use more complex `aggregate` function:
179179
```python

0 commit comments

Comments
 (0)