Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
dougbrn committed Jun 10, 2024
1 parent 5a7ec3d commit a71aaf4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/nested_pandas/nestedframe/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,12 @@ def reduce(self, func, *args, **kwargs) -> NestedFrame: # type: ignore[override
key is an output column of the dataframe returned by `reduce`.
Example User Function:
```
import pandas as pd
def my_sum(col1, col2):
'''reduce will return a NestedFrame with two columns'''
return {"sum_col1": sum(col1), "sum_col2": sum(col2)}
>>> import pandas as pd
>>> def my_sum(col1, col2):
>>> '''reduce will return a NestedFrame with two columns'''
>>> return {"sum_col1": sum(col1), "sum_col2": sum(col2)}
```
Expand Down

0 comments on commit a71aaf4

Please sign in to comment.