[Solved] How can i add the numbers of tuples from different lists of a a list in Python? [closed]

If the “list names” are always in the same order, you can do this using a list comprehension with zip and sum: >>> data = [[(‘Lista-A’, 1), (‘Lista-X’, 1), (‘Lista-Z’, 4)], [(‘Lista-A’, 2), (‘Lista-X’, 0), (‘Lista-Z’, 1)], [(‘Lista-A’, 5), (‘Lista-X’, 1), (‘Lista-Z’, 0)], [(‘Lista-A’, 0), (‘Lista-X’, 1), (‘Lista-Z’, 4)]] >>> [(col[0][0], sum(x for _, x … Read more

[Solved] Hello, two questions about sklearn.Pipeline with custom transformer for timeseries [closed]

You can not use target, predicted = pipe.fit_predict(df) with your defined pipeline, because the fit_predict() method can only be used, if the estimator has such a method implemented as well. Reference in documentation Valid only if the final estimator implements fit_predict. Also, it would only return the predictions, so you can not use target,predicted = … Read more