Unique 고유값
List데이터타입을 set으로 변경
r에서는 unique()함수.
myList = ['a', 'b', 'c', 'a', 'b', 'c', 'a'] set(myList) # {'a', 'b', 'c'} list(set(myList)) # ['b', 'c', 'a']
pandas.core.series.Series는 unique()
import plotly.express as px iris = px.data.iris() iris['species'].unique() #array(['setosa', 'versicolor', 'virginica'], dtype=object) list(iris['species'].unique()) # ['setosa', 'versicolor', 'virginica'] myList = ['a', 'b', 'c', 'a', 'b', 'c', 'a'] list(set(myList)) # ['b', 'c', 'a'] list(pd.Series(myList).unique()) iris['species'].value_counts()
df_eda[idx