I have a dataframe like df = pd.DataFrame({\'ID\':[1,1,2,2,3,3,4,4,5,5,5],\'Col1\':[\'Y\',\'Y\',\'Y\',\'N\',\'N\',\'N\',\'Y\',\'Y\',\'Y\',\'N\',\'N\']}). What I
df = pd.DataFrame({\'ID\':[1,1,2,2,3,3,4,4,5,5,5],\'Col1\':[\'Y\',\'Y\',\'Y\',\'N\',\'N\',\'N\',\'Y\',\'Y\',\'Y\',\'N\',\'N\']})