how to remove empty series from list in Python
<p>I have a list which looks something like this.</p>

<pre><code>DB
Out[469]: 
[[3    523
Name: order_id, dtype: object], 0    [526, 533]
Name: order_id, dtype: object, Series([], Name: order_id, dtype: object)]
</code></pre>

<p>And what I want it to look like this. </p>

<pre><code>DB
[['523',['526','533']]]
</code></pre>

<p>I am doing following in python</p>

<pre><code> DB[0][0].values[0]
 Out[462]: '523'

 DB[1][0]
 Out[463]: ['526', '533']
</code></pre>

<p>And to remove empty series </p>

<pre><code> [x for x in DB if x != []]   
</code></pre>

<p>But It doesn't work. I want a for loop which will iterate through <code>DB</code> and give me final output. Please help.</p>