AttributeError: 'DataFrame' object has no attribute
www.py4u.net › discuss › 1385109Answer #4: value_counts work only for series. It won't work for entire DataFrame. Try selecting only one column and using this attribute. For example: It also won't work if you have duplicate columns. This is because when you select a particular column, it will also represent the duplicate column and will return dataframe instead of series.