How can I drop rows in data frames which contains empty lists?
Use series.str.len()
to check the length of elements in the list and then filter out where it equals 0:
df[~df.numbers.str.len().eq(0)]
name country numbers
0 Lewis Spain [1, 4, 6]
2 Andrew UK [3, 5]
Umm check bool
df[df.numbers.astype(bool)]
just check len > 0
df[df['numbers'].str.len()>0]