Skip to content

Commit 9a84d5b

Browse files
committed
fix documentation!
1 parent 3c5bf78 commit 9a84d5b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/source/_code/dataframe-tip.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import pandas as pd
44

55
from pypair.association import binary_binary
6+
from pypair.util import corr
67

78

89
def get_data(n_rows=1000, n_cols=5):
@@ -16,8 +17,8 @@ def get_data(n_rows=1000, n_cols=5):
1617
tanimoto = lambda a, b: binary_binary(a, b, measure='tanimoto_i')
1718

1819
df = get_data()
19-
jaccard_corr = df.corr(method=jaccard)
20-
tanimoto_corr = df.corr(method=tanimoto)
20+
jaccard_corr = corr(df, jaccard)
21+
tanimoto_corr = corr(df, tanimoto)
2122

2223
print(jaccard_corr)
2324
print('-' * 15)

docs/source/quickstart.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Here's a recipe in using multiprocessing to compute pairwise association with bi
8080
:language: python
8181
:linenos:
8282

83-
Here's another way to use a pandas Dataframe ``corr()`` method to speed up pairwise association computation.
83+
Here's a nifty utility method to create a correlation matrix. The input data frame must be all the same type and you must supply a function. Note that Pandas ``DataFrame.corr()`` no longer supports processing non-numeric data; fields that are not numeric will be simply skipped over. Why?
8484

8585
.. literalinclude:: _code/dataframe-tip.py
8686
:language: python

0 commit comments

Comments
 (0)