I am trying to visualize topics using PyLDAVis but the following code is giving error. Not sure what the issue is.
import pyLDAvis.gensim_models
pyLDAvis.enable_notebook()
vis = pyLDAvis.gensim_models.prepare(lda_model, corpus, id2word)
pyLDAvis.show(vis)
File ~/PycharmProjects/KeyWordExtractor/venv/lib/python3.9/site-packages/pyLDAvis/_prepare.py:228, in _topic_info(topic_term_dists, topic_proportion, term_frequency, term_topic_freq, vocab, lambda_step, R, n_jobs)
225 saliency = term_proportion * distinctiveness
227 # Order the terms for the "default" view by decreasing saliency:
--> 228 default_term_info = pd.DataFrame({'saliency': saliency, 'Term': vocab, \
229 'Freq': term_frequency, 'Total': term_frequency, \
230 'Category': 'Default'}). \
231 sort_values(by='saliency', ascending=False). \
232 head(R).drop('saliency', 1)
233 # Rounding Freq and Total to integer values to match LDAvis code:
234 default_term_info['Freq'] = np.floor(default_term_info['Freq'])
TypeError: drop() takes from 1 to 2 positional arguments but 3 were given