0

I have one csv file-

data = pd.read_csv('New_Region.csv') 
data = data.squeeze() 
data

output is-

0     Region 3
1    Region 11
2     Region 5
3     Region 1
4     Region 8
5    Region 10
6    Region 13
7     Region 2
Name: Region, dtype: object

Now I want to sort the data in ascending way and my expected output is-

3     Region 1
7     Region 2
0     Region 3
2     Region 5
4     Region 8
5    Region 10
1    Region 11
6    Region 13
Name: Region, dtype: object 

I already got the solution by using natsort. But can I get this output using sort_values() but without using the Natsort module?

0 Answers0