You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run the demo_pytextrank.py file. It will crash with:
'<b>%s</b> TextRank score rank: %s/%s' % (cat, term_ranks.loc[term, cat], corpus.get_num_metadata())
AttributeError: 'numpy.ndarray' object has no attribute 'loc'
This appears to be due to a mistake in the code (or some change in a library that's broken it), as term_ranks is a numpy array, not a Pandas dataframe.
Expected behavior
The example should run.
Environment
Scattertext version (e.g., 0.0.2.75): 0.1.19
Have I tried running this on the latest version of Scattertext? N/A, is latest version
OS (e.g., Linux): macOS
How you installed Scattertext (conda, pip, source): Pip
Build command you used (if compiling from source): N/A
Python version: 3.9.16
Version of dependencies: Numpy 1.25.2, Pandas 2.0.3, pytextrank 3.2.5
Any other relevant information:
Additional context
The text was updated successfully, but these errors were encountered:
Thank you for submitting a bug report!
Steps to Reproduce
Run the
demo_pytextrank.py
file. It will crash with:This appears to be due to a mistake in the code (or some change in a library that's broken it), as
term_ranks
is a numpy array, not a Pandas dataframe.Expected behavior
The example should run.
Environment
conda
,pip
, source): PipAdditional context
The text was updated successfully, but these errors were encountered: