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'

Apr 30, 2020 by Bhavitha
• 120 points
10,427 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.

answered May 1, 2020 by MD
• 95,180 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 659 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,467 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
8,812 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,510 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,720 points
67,410 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
2,775 views
+1 vote
2 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
13,563 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,639 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 4, 2019 in Python by Pooja
1,949 views