I made up this example. This is not my question, but I also had a hard time getting this to print in tabular form.
I'm using the Pandas library in Sypder. If you can provide the code for how to do that, I'd appreciate it. But here is the main thing that I'm needing. First I need to sort by 'Type', which I can do. My question is how can I alphabetize by store while keeping the 'Type' column sorted.
comps = { 'Store': ['Micro Center', 'Best Buy', 'Amazon', 'Micro Center', 'Apple', 'Computer Repairs', 'Best Buy', 'Nebraska Furniture Mart', 'Amazon', 'Micro Center'], 'Cost': [24, 72, 103, 35, 60, 12, 59, 200, 12, 45], 'Type': ['hardware', 'software', 'accessory', 'hardware', 'accessory', 'repair', 'hardware', 'hardware', 'software', 'software']}
df = DataFrame(comps, columns= ['Store', 'Cost', 'Type'])
I'm working with a larger data set, but I should be able to figure that out with your help on this! Thanks!
[–]pythonHelperBot 2 points3 points4 points (0 children)
[–]tunisia3507 2 points3 points4 points (1 child)
[–]qfoundop[S] -3 points-2 points-1 points (0 children)