import polars as pl
# Assuming you have a DataFrame called 'df'
# Here's a sample DataFrame for demonstration
data = {'A': [1, 2, 2, 3, 4],
'B': ['a', 'b', 'b', 'c', 'c']}
df = pl.DataFrame(data)
# Get unique values from column 'B'
df = df.unique(subset=['B'])
df = df.sort('B')
print(df)
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme