Solution was linked on reshaped method on documentation page.

Insted of Y.reshape(-1,1) you need to use:

Y.values.reshape(-1,1)
Answer from Hrvoje on Stack Overflow
🌐
GitHub
github.com › pandas-dev › pandas › issues › 35731
BUG: Series has no attribute "reshape" after adding a new category in df · Issue #35731 · pandas-dev/pandas
August 14, 2020 - -> 2747 values = values.reshape(tuple((1,) + shape)) # type: ignore 2748 return values 2749 ~/.pyenv/versions/3.7.0/envs/fair_ml/lib/python3.7/site-packages/pandas/core/generic.py in __getattr__(self, name) 5128 if self._info_axis._can_hold_identifiers_and_holds_name(name): 5129 return self[name] -> 5130 return object.__getattribute__(self, name) 5131 5132 def __setattr__(self, name: str, value) -> None: AttributeError: 'Series' object has no attribute 'reshape'
Author   chen-bowen
Discussions

AttributeError: 'Series' object has no attribute 'reshape'
AttributeError: 'Series' object has no attribute 'reshape' While following your code, the error is thrown in the line: y = data['sales'].values.reshape(-1,1) More on github.com
🌐 github.com
1
June 8, 2020
BUG: Series has no attribute "reshape" after adding a new category in df
We are trying to add the new fillna ... functionality. Running the above snippet will get us the attribute error AttributeError: 'Series' object has no attribute 'reshape'... More on google.com
🌐 google.com
8
August 14, 2020
Profile generation failure - AttributeError: 'Series' object has no attribute 'reshape'
1 Line of code data quality profiling & exploratory data analysis for Pandas and Spark DataFrames. - Data-Centric-AI-Community/ydata-profiling More on github.com
🌐 github.com
2
August 13, 2020
How to fix: Pandas Profiling (v 2.8) Error: 'Series' object has no attribute 'reshape'
Hi community! I've been running into a problem and have looked relentlessly on the internet for a solution. However, I couldn't find one. The problem… More on google.com
🌐 google.com
1
September 3, 2020
🌐
Reddit
reddit.com › r/learnpython › how to fix: pandas profiling (v 2.8) error: 'series' object has no attribute 'reshape'
r/learnpython on Reddit: How to fix: Pandas Profiling (v 2.8) Error: 'Series' object has no attribute 'reshape'
September 3, 2020 - -> 2744 values = values.reshape(tuple((1,) + shape)) # type: ignore 2745 return values 2746 ~\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\generic.py in __getattr__(self, name) 5128 if self._info_axis._can_hold_identifiers_and_holds_name(name): 5129 return self[name] -> 5130 return object.__getattribute__(self, name) 5131 5132 def __setattr__(self, name: str, value) -> None: AttributeError: 'Series' object has no attribute 'reshape' Pandas is 1.1 ·
🌐
YouTube
youtube.com › vlogize
Resolving the "AttributeError: Series Object Has No Attribute Reshape" in Pandas - YouTube
Disclaimer/Disclosure: Some of the content was synthetically produced using various Generative AI (artificial intelligence) tools; so, there may be inaccurac...
Published   August 6, 2024
Views   15
🌐
GitHub
github.com › marcopeix › ISL-linear-regression › issues › 3
AttributeError: 'Series' object has no attribute 'reshape' · Issue #3 · marcopeix/ISL-linear-regression
June 8, 2020 - AttributeError: 'Series' object has no attribute 'reshape' While following your code, the error is thrown in the line: y = data['sales'].values.reshape(-1,1)
Author   NanduRaj
🌐
GitHub
github.com › pandas-profiling › pandas-profiling › issues › 545
Profile generation failure - AttributeError: 'Series' object has ...
August 13, 2020 - Profile generation failure - AttributeError: 'Series' object has no attribute 'reshape'#545 · Copy link · justinsola · opened · on Aug 13, 2020 · Issue body actions · Describe the bug · I apologize if I am reporting poorly or misunderstanding the basics, I am inexperienced and this is my first bug report.
Author   justinsola
🌐
GuidingCode
guidingcode.com › home › how to fix “attributeerror: ‘series’ object has no attribute ‘reshape'” in python?
[Fixed] AttributeError: 'Series' Object Has No Attribute 'Reshape'
January 26, 2023 - The AttributeError: ‘series’ object has no attribute ‘reshape’ occurs when the series object does not support the reshape().
Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › 74524908 › mnist-attributeerror-series-object-has-no-attribute-reshape
python - MNIST AttributeError: 'Series' object has no attribute 'reshape' - Stack Overflow
y = y.reshape(1, examples) should instead be y = np.reshape(1, examples) numpy.org/doc/stable/reference/generated/numpy.reshape.html ... This is sklearn.datasets.fetch_openml? If so, target return can be target: np.array, pandas Series or DataFrame. So, the question would be why you get a different target on different machines. Right after fetch_openml, you could assert isinstance(y, np.ndarray) and get rid of the rest of the script as not relevant.
🌐
HatchJS
hatchjs.com › home › how to fix attributeerror: ‘series’ object has no attribute ‘reshape’
How to Fix AttributeError: 'Series' object has no attribute 'reshape'
January 5, 2024 - This means that you cannot use the ‘reshape’ method on a Series object. ... If you get the ‘AttributeError: ‘Series’ object has no attribute ‘reshape” error, you can fix it by converting your Series object to a NumPy array.
🌐
Google
google.com › goto
AttributeError: 'Series' object has no attribute 'as_matrix' - PyTorch Forums
February 11, 2020 - When I execute the code of the official website, I get such an error. Why? code show as follow: landmarks_frame = pd.read_csv(‘F:\OfficialData\faces\face_landmarks.csv’) n = 65 img_name = landmarks_frame.iloc[n, 0] landmarks = landmarks_frame.iloc[n, 1:].as_matrix() landmarks = landmarks.astype(‘float’).reshape(-1, 2) print(‘Image name: {}’.format(img_name)) print(‘Landmarks shape: {}’.format(landmarks.shape)) print(‘First 4 Landmarks: {}’.format(landmarks[:4]))
🌐
Data Science Learner
datasciencelearner.com › home › dataframe’ object has no attribute ‘reshape’ ( solved )
dataframe' object has no attribute 'reshape' ( Solved )
September 12, 2023 - The most common reason for getting this error is that you are not properly using the reshape() function on the dataframe. You must be using the reshape() on the entire dataframe or series.
🌐
HatchJS
hatchjs.com › home › series object has no attribute ‘reshape’: how to fix this error
Series object has no attribute 'reshape': how to fix this error
January 5, 2024 - This error can be fixed by using the `reshape()` method on the Series' index instead of the Series itself. For example, to reshape a Series with 100 rows into a 10x10 array, you would use the following code: `series.index.reshape(10, 10)`.
🌐
Google
google.com › 🤗datasets
Seeing AttributeError: 'Dataset' object has no attribute 'reshape' when using "dataset.get_nearest_examples" - 🤗Datasets - Hugging Face Forums
June 25, 2023 - Hello, I am trying to use Faiss indexing for an image similarity application. However, I am seeing an Attribute Error. Here’s the code that I am trying # Loading dataset dataset = load_dataset("imagefolder", data_dir="/…