tsfresh
tsfresh copied to clipboard
IndexError: cannot do a non-empty take from an empty axes.
This error occurs when using EfficientFCParameters or ComprehensiveFCParameters (not MinimalFCParameters). Error does not occur when pandas version is 1.3.5. However this is an old version and is not compatible with other python packages. Can you please resolve the issue making it work with later panda versions such as 1.4.3?
Hi @hn2 ! Thanks for filing the issue and sorry for the late response. Unfortunately, I can not reproduce the issue. Do you maybe have a minimal example?
I am using pandas
in version 1.5.3 on python 3.9 with the following code:
import tsfresh
from tsfresh.feature_extraction import ComprehensiveFCParameters
from tsfresh.examples.robot_execution_failures import load_robot_execution_failures
if __name__ == "__main__":
df, y = load_robot_execution_failures()
print(tsfresh.extract_features(df, column_id="id", column_sort="time",
default_fc_parameters=ComprehensiveFCParameters()))
I have this problem when using Pandas version 2.0. It works when I use version 1.3.5.
I am facing this problem with pandas
1.5.2, and tsfresh
0.19.0.
I am not using any default_fc_parameters
.
I've noticed that when using a smaller number of rows (in my case, ~200) it works fine. When going up to 220 rows it crashes.
Maybe it has something to do with number of unique IDs? With 200 rows, I have 16-17 unique IDs (works), with 220 rows it goes up to 19-20 (doesn't work).
I still haven't found anything else that seems suspicious.
@dor132 , @morestart, @hn2 - has one of you a reproducible example with the data for me? Anything I can use for debugging? Thank you!
Or does anyone maybe have the full stacktrace?
@nils-braun Yes. In my case I eventually concluded the problem was an ID that had a single row in the DataFrame. Eliminating such IDs resolved the error.