import pandas as pd df = pd.DataFrame( {\'A\': [1,1,2,3,4,5,5,6,7,7,7,8]} ) dummy = df["A"] print(dummy) 0 1 1 1 2 2 3 3 4 4 5 5 6