Skip to content

Commit

Permalink
pyLDAvis drop() takes from 1 to 2 positional arguments but 3 were given
Browse files Browse the repository at this point in the history
  • Loading branch information
msusol committed Apr 23, 2023
1 parent 1b88bc8 commit 8de6b2c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
History
-------

3.4.1 (2023-04-23)
~~~~~~~~~~~~~~~~~~
* Pandas 2.x release, the drop shall use .drop(saliency, axis=1) #247

3.4.0 (2023-02-12)
~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion pyLDAvis/_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def _topic_info(topic_term_dists, topic_proportion, term_frequency, term_topic_f
'Total': term_frequency,
'Category': 'Default'})
default_term_info = default_term_info.sort_values(
by='saliency', ascending=False).head(R).drop('saliency', 1)
by='saliency', ascending=False).head(R).drop('saliency', axis=1)
# Rounding Freq and Total to integer values to match LDAvis code:
default_term_info['Freq'] = np.floor(default_term_info['Freq'])
default_term_info['Total'] = np.floor(default_term_info['Total'])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

setup(
name='pyLDAvis',
version='3.4.0',
version='3.4.1',
description='Interactive topic model visualization. Port of the R package.',
long_description=readme,
author='Ben Mabey',
Expand Down

0 comments on commit 8de6b2c

Please sign in to comment.