Closed Eisbrenner closed 2 years ago
Hi, thanks for pointing this out, I have pandas v1.3.5 installed, so I guess that's why this never happen and thanks for proposing a solution. I'll update pandas and look into this later today
Hi, this can actually be simplifies further by simply using
index_start = ('start', 'first'),
index_end = ('end', 'first'),
in the agg_df() function (roughly line 118 in features.py)
I didn't realised before this would return the first non-NaN value in the series rather than the first actual value. I'm not sure if this fix would work with pandas 1.4.0 or 1.4.1 as we have pinned our pandas to 1.3.5, as 1.4.0 was breaking other packages. As the gruopby.agg.first is used elsewhere I'm assuming this shouldn't be an issue Thanks again for pointing this out, I might not push the changes yet to the main branch, as there were other parts I was working on, but I pushed them to the 'timestep' branch
This is now resolved in the new release 8.0
Hi, I run into an issue with the
unique_dropna
function applied in the pandas aggregation inagg_df
. In my current pandas version (1.4.0) the return type ofunique_dropna
(a numpy.ndarray) is not valid for an aggregation.In an experimental fix I just used the first value of the return array (assuming that it would be one at all times anyway), which seems to work. But I'm not quite sure if this conflicts with some other part or ideas.
I got the, lets say solution, through this question/answer https://stackoverflow.com/a/39842473
So here the quick and dirty fix:
Best regards and thanks for providing this package :)
full error log below: