I have a list that contains mostly pandas series objects and a few float values.
I want to look through the entire list and remove all the entries that just float and retain the ones that are series objects.
What's the best way to do it?
You could use Python's built-in filter
:
list(filter(lambda x : type(x) == pandas.Series, your_list))