-1

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?

0

1 Answer 1

1

You could use Python's built-in filter:

list(filter(lambda x : type(x) == pandas.Series, your_list))
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.