Pandas dataframe sort

Posted under » Python Data Analysis on 25 August 2024

To sort

taik1 = [10, 20, 40, 15]

taik2 = ['pun', 'dek', 'shanmugam', 'LKY']

import pandas as pd

mydataset = {
    'hid' : taik1,
    'animal' : taik2
}

df = pd.DataFrame(mydataset)

sorted_df = df.sort_values(by='animal')
print(sorted_df)

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS data