sorted(iterable)
: Return a new sorted list from the items in iterable.
CODE
import pandas as pd
df = pd.DataFrame({'A':[1,1,3,2,6,2,8]})
a = df['A'].unique()
print(sorted(a))
OUTPUT
[1, 2, 3, 6, 8]
More Related Contents:
- how to sort pandas dataframe from one column
- Why does my Pandas DataFrame not display new order using `sort_values`?
- Sort a pandas dataframe series by month name
- pandas unique values multiple columns
- Python – Delete duplicates in a dataframe based on two columns combinations?
- Pandas DataFrame sort by categorical column but by specific class ordering
- Sorting by absolute value without changing the data
- How to sort pandas data frame using values from several columns?
- Multi Index Sorting in Pandas
- Pandas conditional creation of a series/dataframe column
- Truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()
- How to unnest (explode) a column in a pandas DataFrame, into multiple rows
- How to split a dataframe string column into two columns?
- Annotate bars with values on Pandas bar plots
- Comparing two dataframes and getting the differences [duplicate]
- Accessing Pandas column using squared brackets vs using a dot (like an attribute)
- Get the name of a pandas DataFrame
- What is the difference between join and merge in Pandas?
- Ambiguity in Pandas Dataframe / Numpy Array “axis” definition
- Pandas Dataframe: Replacing NaN with row average
- How to read a .xlsx file using the pandas Library in iPython?
- Converting a column within pandas dataframe from int to string
- Convert pandas data frame to series
- Pandas – dataframe groupby – how to get sum of multiple columns
- Pandas DataFrame merge summing column
- Mapping ranges of values in pandas dataframe [duplicate]
- pandas: combine two columns in a DataFrame
- Convert month int to month name in Pandas
- Python: Adding hours to pandas timestamp
- Pandas: Join dataframe with condition