Question : finding the Unique values in data
Answered by : donpech
##finding the Unique values in data ie: Age
df['Age'].unique()
Source : | Last Update : Tue, 15 Mar 22
Question : How to Find Unique Values in a Column in Pandas
Answered by : itsmycode
# import pandas library
import pandas as pd
# create pandas DataFrame
df = pd.DataFrame({'fruits': ['orange', 'mango', 'apple', 'grapes', 'orange', 'mango'], 'price': ['40', '80', '30', '40', '30', '80'], 'quantity': ['200', '300', '300', '400', '200', '800'] })
# get the unique value of column fruits
print(df.fruits.unique())
Source : https://itsmycode.com/pandas-how-to-find-unique-values-in-a-column/ | Last Update : Sat, 22 Jan 22
Question : Getting unique values in a column
Answered by : david-k
# 10. Getting unique names of values in a column
df['Airline'].unique()
Source : https://jyoti05iitd.medium.com/python-pandas-cheat-sheet-30-functions-methods-b1176f2e37da | Last Update : Thu, 06 Oct 22