File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ Install latest `pandas-path` with `pip`.
18
18
pip install pandas-path
19
19
```
20
20
21
- Import ` path ` from ` pandas_path ` , and then the ` .path ` accessor will be available on any Series or Index:
21
+ Import ` pandas_path.path ` , and then the ` .path ` accessor will be available on any Series or Index:
22
22
23
23
``` python
24
24
# this is all you need
25
- from pandas_path import path
25
+ import pandas_path. path
26
26
```
27
27
28
28
Now you can use all the pathlib methods using the ` .path ` accessor on any Series in ` pandas ` !
@@ -54,10 +54,11 @@ import pandas as pd
54
54
55
55
# This is the only line you need to register `.path` as an accessor
56
56
# on any Series or Index in pandas.
57
- from pandas_path import path
57
+ import pandas_path. path
58
58
59
59
# we'll make an example series from the py files in this repo;
60
60
# note that every element here is just a string--no need to make Path objects yourself
61
+ # ... but of course, this also works with `Path` as well
61
62
file_paths = pd.Series(str (s) for s in Path().glob(' **/*.py' ))
62
63
63
64
# 0 setup.py
You can’t perform that action at this time.
0 commit comments