Closed
Description
df = pd.DataFrame({
'col1': ['A', 'A', 'A', 'A', 'A', 'A']*15,
'col2': [1.0, 1.0, 1.0, 1.0, 1.0, 1.0]*15,
'col3': [0, 1, 9, 4, 2, 3]*15,
'col4': ['a', 'B', 'c', 'D', 'e', 'F']*15
})
df.sort_values('col2', ascending=True)
Why this operation disorders the entire dataframe ? The same will be produced if the function will be applied for the col1.