Python Pandas error AttributeError DataFrame object has no attribute make

0 votes

i was trying to print unique values in my data

%matplotlib inline
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

df=pd.read_csv("data.csv")
df.info()

df.shape

df.describe

df.head(10)

df.Make.unique()

but it resulting an error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-6-9ae14dea9ad3> in <module>
----> 1 df.Make.unique()

~\Anaconda3\lib\site-packages\pandas\core\generic.py in __getattr__(self, name)
   5177             if self._info_axis._can_hold_identifiers_and_holds_name(name):
   5178                 return self[name]
-> 5179             return object.__getattribute__(self, name)
   5180 
   5181     def __setattr__(self, name, value):

AttributeError: 'DataFrame' object has no attribute 'Make'

May 1, 2020 by Bhavitha
• 120 points
12,932 views

1 answer to this question.

0 votes

Hi@Bhavitha,

I don't think pandas has a function called Make. But if you are trying to remove duplicate value or null value, you can use the below function.

$ df.nunique()

Hope this will help you!

If you are a beginner and need to know more about Python, It's recommended to go for Python Certification course today.

Thanks!

answered May 1, 2020 by MD
• 95,320 points
Traceback (most recent call last):
  File "C:/Users/vaibhav verma/PycharmProjects/SLR/main.py", line 9, in <module>
    plt.scatter(df.area, df.price, color='red', marker='*')
  File "C:\Users\vaibhav verma\PycharmProjects\SLR\venv\lib\site-packages\pandas\core\generic.py", line 5139, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'area'

**Guys please help me gives error while showing the graph(python with ML using pycharm)

Related Questions

0 votes
1 answer

How to rename columns in pandas (Python)?

You can use the rename function in ...READ MORE

answered Apr 30, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Jun 8, 2020 by MD 790 views
0 votes
1 answer

What is the Difference in Size and Count in pandas (python)?

The major difference is "size" includes NaN values, ...READ MORE

answered Apr 30, 2018 in Data Analytics by DeepCoder786
• 1,720 points

edited Jun 8, 2020 by Gitika 1,609 views
0 votes
2 answers

Replacing a row in pandas data.frame

key error. I love python READ MORE

answered Feb 18, 2019 in Data Analytics by anonymous
9,869 views
0 votes
1 answer

Converting a pandas data-frame to a dictionary

Emp_dict=Employee.to_dict('records') You can directly use the 'to_dict()' function ...READ MORE

answered May 23, 2018 in Data Analytics by Bharani
• 4,620 points
3,658 views
0 votes
2 answers

Python Pandas error: AttributeError: 'DataFrame' object has no attribute 'rows'

Try this: data=pd.read_csv('/your file name', delim_whitespace=Tru ...READ MORE

answered Dec 10, 2020 in Python by anonymous
• 82,860 points
83,224 views
0 votes
1 answer

Python error "AttributeError: '_Screen' object has no attribute 'mainloop'" python module turtle

Hey @Nagya, replace  wn.mainlopp() with turtle.mainloop() ...READ MORE

answered Jun 19, 2019 in Python by Faiza
3,642 views
+1 vote
3 answers

Python error "AttributeError: 'Turtle' object has no attribute 'Shape'"

Hey @Nagya, replace python.Shape("Square") with the following: python.shape("square") Python is case ...READ MORE

answered Jun 19, 2019 in Python by Faiza
16,452 views
0 votes
1 answer

Python error "AttributeError: 'str' object has no attribute 'casefold'"

Check your python version. Casefold is possible ...READ MORE

answered Jul 4, 2019 in Python by Yesha
3,991 views
0 votes
1 answer

Python error "AttributeError: '_Screen' object has no attribute 'onkeypress'"

Instead of  wn.onkeypress(go_up, "w") Try wn.onkey(go_uo, " ...READ MORE

answered Jul 5, 2019 in Python by Pooja
2,470 views