Answers for "pandas only show unique rows"

4

dataframe unique values in each column

for col in df:
    print(df[col].unique())
Posted by: Guest on August-20-2020
0

get unique words from pandas dataframe

results = set()
df['text'].str.lower().str.split().apply(results.update)

$ set(['someone', 'ft.jgt', 'my', 'is', 'to', 'going', 'place', 'nickname'])
Posted by: Guest on November-25-2020

Python Answers by Framework

Browse Popular Code Answers by Language