Skip to content

Tag: pandas

Method type inside a column pandas

I have the following data frame I need to iterate over the product to extract the unique values. The problem is that when I tried to iterate over the column product: The following error is shown: “‘method’ object is not iterable”. To extract the product from the sentences I have used t…

Pandas best way to iterate over rows quickly

I need to compare each value of a list to each value of a df column, and if there is a match take the value of another column. I have a couple of loops working with iterrows but the code is taking a long time to run. I was wondering if there is a more efficient way to do this?

Get all dates between start and end date pandas columns

I’m trying to get a list of dates between two start and end date pandas columns, with individual IDs. I’ve found an answer that is basically what I’m after (https://stackoverflow.com/a/53409207/14463396) but this only works if the periods between the start and end dates don’t overlap, …