Skip to content

Commit 9493c78

Browse files
committed
docs
1 parent 22e5368 commit 9493c78

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

docs/pandas-accessors.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ you will need to run something like:
2121
```python
2222
from pandas_openscm.accessors import register_pandas_accessors
2323

24-
# The 'pd.DataFrame.openscm' and 'pd.Series.openscm' namespaces
24+
# The `pd.DataFrame.openscm` and `pd.Series.openscm` namespaces
2525
# will not be available at this point.
2626

2727
# Register the accessors
2828
register_pandas_accessors()
2929

30-
# The 'pd.DataFrame.openscm' and 'pd.Series.openscm' namespaces
30+
# The `pd.DataFrame.openscm`, `pd.Series.openscm` and `pd.Index.openscm` namespaces
3131
# will now be available.
3232
# I.e. you could now do something like
3333
df = pd.DataFrame(
@@ -53,9 +53,14 @@ df.openscm.to_long_data()
5353
register_pandas_accessors(namespace="my_custom_namespace")
5454

5555
# Doing it this way will make the custom namespace available under
56-
# 'pd.DataFrame.my_custom_namespace' and 'pd.Series.my_custom_namespace'.
56+
# `pd.DataFrame.my_custom_namespace`,
57+
# `pd.Series.my_custom_namespace`
58+
# and `pd.Index.my_custom_namespace`.
59+
df.my_custom_namespace.to_long_data()
5760
```
5861

5962
The full accessor APIs are documented at
60-
[pandas_openscm.accessors.dataframe.PandasDataFrameOpenSCMAccessor][]
61-
and [pandas_openscm.accessors.series.PandasSeriesOpenSCMAccessor][].
63+
[pandas_openscm.accessors.dataframe.PandasDataFrameOpenSCMAccessor][],
64+
[pandas_openscm.accessors.series.PandasSeriesOpenSCMAccessor][]
65+
and
66+
[pandas_openscm.accessors.index.PandasIndexOpenSCMAccessor][].

0 commit comments

Comments
 (0)