Selecting distinct values in a column of a SQL table, translated to Python's pandas.

Selecting distinct values from a column

In SQL:

SELECT 
  DISTINCT column_1
FROM
  table;

In pandas:

table['column_1']
    .drop_duplicates()
    .reset_index(drop=True)

The .reset_index(drop=True) makes sure the index of the returned table starts with row index 0.


References