Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas get column values distinct

import pandas as pd

colors = {'color': ['green', 'blue', 'blue', 'red', 'green']}
df = pd.DataFrame.from_dict(colors)

print(df['color'].unique())
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #column #values #distinct
ADD COMMENT
Topic
Name
4+3 =