Using Anaconda Spyder, Python 3.8.3, nltk 3.5. The code and output below:
from nltk.corpus import reuters
cfd = [('gas', word) for word in brown.words(categories='gas')]
print(cfd.tabulate(conditions=['gas'], samples=['gasoline', 'barrels']))
----------------
Output:
gasoline barrels
gas 77 64
None
How can I remove None from this output?
FYI - None is not in output when I use Jupyter notebook as below:
cfd = [('gas', word) for word in brown.words(categories='gas')]
cfd.tabulate(conditions=['gas'], samples=['gasoline', 'barrels']
----------------
Output:
gasoline barrels
gas 77 64