0

I have dataframe in pandas with columns. I want list only the unique combinations .How can do it.

**Input**

data[['Month','Ratio']]

Month  Ratio
3      0.7169653 
3      0.7169653      
3      0.7169653
6      0.6789213
6      0.6789213
7      0.2345671
7      0.2345671
7      0.2345671
7      0.2345671
12     0.5623451
12     0.5623451
12     0.5623451
1      0.9808901


**Expected Output**

Month  Ratio
3      0.7169653 
6      0.6789213
7      0.2345671
12     0.5623451
1      0.9808901

How to do this in python

GordonW
  • 1,120
  • 2
  • 16
  • 36
Rahul rajan
  • 1,186
  • 4
  • 18
  • 32

1 Answers1

0

I used drop_duplicates() function

 Month_unique= data[['Month','Month_Ontime_Delivery_Ratio']].drop_duplicates()

This resolved the issue.

Rahul rajan
  • 1,186
  • 4
  • 18
  • 32