IndentationError: expected an indented block when trying to reproduce LDA for a document : <p>I am trying to obtain the LDA distribution among the first article of my collection but I am running into several errors:</p>

<p>my collection: <code>doc_set</code>, is a <code>pandas.core.series.Series</code>. Whenever I wanted to run the simple code:</p>

<pre><code>print(ldamodel[doc_set[1]])
</code></pre>

<p>I run the following error: <code>ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().</code> Which I think I solved it by:</p>

<pre><code>if doc_set is not None:
print(ldamodel[doc_set[1]])
</code></pre>

<p>Nevertheless, now I get the following error: <code>IndentationError: expected an indented block</code>. I am looking for the intuition of the error rather than the correction, I cannot put my whole LDA for reproduction because it is too massive. Thanks in advance!</p>
