Skip to content

Commit 464cd01

Browse files
authored
Making a "flavor" python module (fixes #11)
1 parent 1953aee commit 464cd01

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ accessor that provides plotting functionality.
3030
Add an accessor by registering the function with the following decorator
3131
and passing the decorator an accessor name.
3232

33+
3334
```python
35+
# my_flavor.py
36+
3437
import pandas as pd
3538
import pandas_flavor as pf
3639

@@ -48,6 +51,7 @@ class MyFlavor(object):
4851

4952
Every dataframe now has this accessor as an attribute.
5053
```python
54+
import my_flavor
5155

5256
# DataFrame.
5357
df = DataFrame(data={
@@ -81,6 +85,8 @@ Using this package, you can attach functions directly to Pandas objects. No
8185
intermediate accessor is needed.
8286

8387
```python
88+
# my_flavor.py
89+
8490
import pandas as pd
8591
import pandas_flavor as pf
8692

@@ -92,6 +98,8 @@ def row_by_value(df, col, value):
9298
```
9399

94100
```python
101+
import my_flavor
102+
95103
# DataFrame.
96104
df = DataFrame(data={
97105
"x": [10, 20, 25],

0 commit comments

Comments
 (0)