AttributeError - "module 'pandas' has no attribute 'DataFram'" | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

AttributeError - "module 'pandas' has no attribute 'DataFram'"

Hi everybody, I'm working on a supervised learning project and I'm having trouble with an attribute issue that I began after reading this (https://www.scaler.com/topics/data-science/data-scientist-roadmap/). When I try to generate a DataFrame from a dictionary using pandas, I get the following error: AttributeError: module 'pandas' has no attribute 'DataFram' This is the first time I've encountered this problem when using pandas for data manipulation. Could someone kindly explain what's going wrong? Here's a bit of the code that's creating the problem: import pandas as pd # Assuming I have a dictionary called 'data_dict' # with keys 'feature1', 'feature2', and 'target' and their respective values # Create a DataFrame from the dictionary df = pd.DataFram(data_dict) Any information on how to resolve this AttributeError would be highly appreciated. Thank you for your time and help!

27th Jul 2023, 2:25 PM
sarthak jain
sarthak jain - avatar
1 Answer
+ 4
pandas has no DataFram. It has DataFrame. Check the spellings.
27th Jul 2023, 2:46 PM
Lisa
Lisa - avatar