8000
TypeError: "iteration over a 0-d array" when trying to preprocessing.scale a pandas.Series #12622
Labels
Milestone
Description
When trying to call
preprocessing.scale
on apandas.Series
instance, an error is thrown with scikit-learn version 0.20.0. Version 0.19.1. works just fine. The documentation states that the input topreprocessing.scale
can be "array-like", andpandas.Series
should fulfill this requirement since it is a "one-dimensional ndarray".Steps/Code to Reproduce
Expected Results
This should be the output (as it is in version 0.19.1):
A workaround is replacing
preprocessing.scale(s)
withpreprocessing.scale([i for i in s])
, which also yields this output.Actual Results
Versions
The text was updated successfully, but these errors were encountered: