I have a pandas dataframe. I want to print the unique values of one of its columns in ascending order. This is how I am doing it:
import pandas as pd
df = pd.DataFrame({'A':[1,1,3,2,6,2,8]})
a = df['A'].unique()
print a.sort()
The problem is that I am getting a None
for the output.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…