I had the same problem happening on some code that was working perfectly fine after migrating to the latest Pycharm version.

I assume you are using the latest Pycharm version (2019.2). I don't have an explanation to why this is causing the issue but installing the older Pycharm 2019.1.4 fixed the problem for me.

Answer from Ben on Stack Overflow
🌐
Quora
quora.com › How-do-you-fix-pandas-that-have-no-attribute-dataframe
How to fix pandas that have no attribute dataframe - Quora
... This happens if you are trying to access some object with an attribute, and that attribute doesn't exist or mis-spelled. For example, let's say you have a NumPy ndarray object. you can check it’s shape using the attribute shape as shown below.
🌐
Edureka Community
edureka.co › community › 42320 › python-pandas-attributeerror-dataframe-object-attribute
Python Pandas error AttributeError DataFrame object has ...
March 28, 2019 - Host '172.31.27.232' is blocked because of many connection errors; unblock with 'mariadb-admin flush-hosts'
🌐
GitHub
github.com › modAL-python › modAL › issues › 139
AttributeError: 'DataFrame' object has no attribute 'reshape' · Issue #139 · modAL-python/modAL
September 2, 2021 - AttributeError: 'DataFrame' object has no attribute 'reshape'#139 · Copy link · ghezalahmad · opened · on Sep 2, 2021 · Issue body actions · Hi, In this code I get the error. Where the X_pool shape is (1024, 8). query_idx, query_instances = learner.query(X_pool, n_instances=5) Please let me know what is wrong here.
Author   ghezalahmad
🌐
GitHub
github.com › slundberg › shap › issues › 2343
AttributeError: 'Exact' object has no attribute 'shape' · Issue #2343 · shap/shap
January 2, 2022 - AttributeError: 'Exact' object has no attribute 'shape'#2343 · Copy link · nklsrdlr · opened · on Jan 2, 2022 · Issue body actions · Hi all, I want to apply the SHAP package to explain the output of a few different models. One of those is sklearn's SVC.
Author   nklsrdlr
🌐
GitHub
github.com › arturomoncadatorres › deepsurvk › issues › 81
'DataFrame' object has no attribute 'reshape' error in examples/01_using_deepsurvk.py · Issue #81 · arturomoncadatorres/deepsurvk
March 11, 2021 - Describe the bug Following the code of the examples/01_using_deepsurvk.py file, you encounter en error in line 91 when reshaping Y_train. Steps/code to reproduce X_train, Y_train, E_train, = load_whas(partition='training') X_test, Y_test...
Author   FoppeCrezee
🌐
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
Find elsewhere
🌐
Databricks Community
community.databricks.com › t5 › data-engineering › attributeerror-dataframe-object-has-no-attribute › td-p › 61132
AttributeError: 'DataFrame' object has no attribut... - Databricks Community - 61132
February 19, 2024 - Hello, I have some trouble deduplicating rows on the "id" column, with the method "dropDuplicatesWithinWatermark" in a pipeline. When I run this pipeline, I get the error message: "AttributeError: 'DataFrame' object has no attribute 'dropDuplicatesWithinWatermark'" Here is part of the code: @dl...
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-fix-attributeerror-object-has-no-attribute
How to fix AttributeError: object has no attribute - GeeksforGeeks
July 23, 2025 - It typically consists of two parts: "AttributeError" and "Object has no attribute." The former indicates the type of error, and the latter suggests that the attribute we are trying to access does not exist for the object.
🌐
Data Science Learner
datasciencelearner.com › attributeerror-list-object-has-no-attribute-shape-solved
AttributeError: list object has no attribute shape ( Solved )
September 14, 2023 - However, shape() is not defined within the list class. The best way to fix this issue is to use len() function. Since this list data structure is only one dimensional and it has only length.
🌐
GitHub
github.com › dovpanda-dev › dovpanda › issues › 103
Bug - object has no attribute 'shape' · Issue #103 · dovpanda-dev/dovpanda
November 18, 2019 - x=pd.DataFrame({'dictionary':[{100: 1, 200: 2}]}) s = x.iloc[0] s.dictionary · ~/anaconda3/lib/python3.6/site-packages/dovpanda/core.py in suggest_at_iat(res, arguments) 186 def suggest_at_iat(res, arguments): 187 self = arguments.get('self') --> 188 shp = res.shape 189 if res.ndim < 1: # Sometimes specific slicing will return value 190 return · AttributeError: 'dict' object has no attribute 'shape' No one assigned ·
Author   AmeenAli
🌐
Stack Overflow
stackoverflow.com › questions › 58584468 › dataframe-has-no-reshape-attribute
python 3.x - DataFrame has no Reshape Attribute - Stack Overflow
The first error that you encounter meant that either the dimension of X_train.shape and y_train.shape are not consistent or the number of element of len(X_train) != len(y_train) or (X_train.shape[0] != (y_train.shape[0]). Besides, if your code is exactly what you posted, I don't see any relevance between df.reshape((df.shape[0], df.shape[1], 1)) and plt.scatter(X_train, y_train, color = 'red'). You need a trick to reshape pandas dataframe.
🌐
Coder Legion
coderlegion.com › 367 › resolved-attributeerror-dataframe-object-has-no-attribute-reshape
Resolved: Attributeerror: 'dataframe' object has no attribute 'reshape' - Coder Legion
Encountering the `AttributeError 'DataFrame' object has no attribute 'reshape'` is common when using Pandas in Python. It happens due to the absence of the reshape attribute within the DataFrame class, especially during reshaping operations. ...
🌐
Codecademy Forums
discuss.codecademy.com › data science
AttributeError: 'DataFrame' object has no attribute 'fit' - Data Science - Codecademy Forums
May 6, 2024 - I’m working on the final project for Machine Learning Engineering. I’m using jupyter notebook to fit the data. When I try to fit the data, I keep getting an error message saying: " AttributeError: ‘DataFrame’ object h…
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 488593 › machine-learning-studio-issue
Machine Learning Studio Issue - Microsoft Q&A
@Harris, Toby I think the issue might be in what you have connected as input to the execute python script. Because, the input from dataframe1 or frame1 does not seem to contain the required attribute that is referenced.