1 개요[ | ]
- pandas.unique
- Pandas unique()
Python
Reload
Copy
import pandas as pd
pd.unique(pd.Series([2, 1, 3, 3]))
Loading
Copy
pd.unique(pd.Series([2] + [1] * 5))
Loading
Copy
pd.unique(pd.Series([pd.Timestamp("20160101"), pd.Timestamp("20160101")]))
Loading
Copy
pd.unique(
pd.Series(
[
pd.Timestamp("20160101", tz="US/Eastern"),
pd.Timestamp("20160101", tz="US/Eastern"),
]
)
)
Loading
Copy
pd.unique(
pd.Index(
[
pd.Timestamp("20160101", tz="US/Eastern"),
pd.Timestamp("20160101", tz="US/Eastern"),
]
)
)
Loading
Copy
pd.unique(list("baabc"))
Loading
Copy
pd.unique(pd.Series(pd.Categorical(list("baabc"))))
Loading
Copy
pd.unique(pd.Series(pd.Categorical(list("baabc"), categories=list("abc"))))
Loading
Copy
pd.unique(
pd.Series(
pd.Categorical(list("baabc"), categories=list("abc"), ordered=True)
)
)
Loading
Copy
pd.unique([("a", "b"), ("b", "a"), ("a", "c"), ("b", "a")])
Loading
2 같이 보기[ | ]
3 참고[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.