Python Forum
How many unique values of quality are in this dataset?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How many unique values of quality are in this dataset?
#2
(May-20-2018, 01:23 PM)Jack_Sparrow Wrote:
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-52-d254f858d008> in <module>()
----> 1 res = pd.df['quality'].nunique()

AttributeError: module 'pandas' has no attribute 'df'
Can somebody help?

Well, it does not Doh . Read your code again - why pd.df?
Test everything in a Python shell (iPython, Azure Notebook, etc.)
  • Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
  • Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
  • You posted a claim that something you did not test works? Be prepared to eat your hat.
Reply


Messages In This Thread
RE: How many unique values of quality are in this dataset? - by volcano63 - May-20-2018, 01:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pandas: Compute the % of the unique values in a column JaneTan 1 1,794 Oct-25-2021, 07:55 PM
Last Post: jefsummers
  Pandas + Groupby + Filter unique values JosepMaria 1 2,893 Jun-15-2020, 08:15 AM
Last Post: JosepMaria
  spread values of dataset equally over fixed number of bins moose_man 3 2,536 Oct-30-2019, 07:41 PM
Last Post: ichabod801
  Join Predicted values with test dataset bhuwan 4 10,430 Mar-28-2019, 12:42 AM
Last Post: bhuwan
  Get max values based on unique values in another list - python Antonio 8 8,440 Jun-12-2018, 07:49 PM
Last Post: Mekire

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020