'sorting rows in a csv files using Pandas column wise with specific condition
I have a quick question regarding sorting rows in a csv file using Pandas. The CSV file which I have has the data that looks like:
item,description,Qty,Price
BILL NO : 1121,,,
xxx,aaa,1,232
yyy,bbb,1,382
aaa,ccc,1,46
ccc,ddd,1,50
,,Total,856
I need to sort in the following way: sort the 1st column item on alphabet-wise. So the output should look like the following:
item,description,Qty,Price
BILL NO : 1121,,,
aaa,ccc,1,46
ccc,ddd,1,50
xxx,aaa,1,232
yyy,bbb,1,382
,,Total,856
Any help/suggestions?
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
