Articles → Pandas → Unique Function In Dataframe In Pandas
Unique Function In Dataframe In Pandas
Purpose
Example
import pandas as pd
list = [[1,21,3], [1,5,6], [7, 8,9]]
df = pd.DataFrame(list, columns=['col1','col2','col3'])
print(df['col1'].unique())
Output
Click to Enlarge