I have a pandas DataFrame where one column contains lists and would like to select the rows where the lists are not empty.
Example data:
df = pd.Data
Empty lists evaluate to False in a boolean context
False
df[df.my_list.astype(bool)] letter my_list 0 a [0, 1, 2] 1 b [1, 2] 4 e [0, 1]