-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort Excel Sheet Hacktoberfest_Inputt.xls #20
base: main
Are you sure you want to change the base?
Conversation
…cel file, sorted output excel file.
Can you import this as a module in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ERROR:-
sorted_dataframe = df.sort_values(['Source', 'Destination'], ascending=[1, 1])
NameError: name 'df' is not defined
…it__.py so that the module can be imported. Imported the module in zip.py and called it in the main() function.
Hi @achoudh5 Sorry for the delay. Had a busy week at work. I've committed the following changes:
Please let me know if anything else is to be done. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ishita-Mehta Most of the changes done are good but if I glance at the first column where I am guessing those are the original sheet's row numbers it's a bit wonky. I would request the following changes:-
- Put a heading in row 1, column 1 . tell the user what these numbers mean?
- Check the column 1 entries, use more test cases. All the rows with no cource and destination color should be a the bottom (in terms of priority/sorting). So, as per your script i could see that the first row has nothing but
abcd text
in source column. You should put this rown in bottom just because it didn't come up with a source and dest color. - Once you are done with priority/sorting of rows with no source and destination colors, take a look at the mapping of your original row numbers to the newly sorted excel file. The
abcd text
row which we move to the bottom should still show the mapping to be 1 cz it was row 1 in the original sheet and similarly for others too (ex, Yellow to red row should show line 8 not 6 after sorting too) - Can we do it all at one place,
zip.py
kinda uses the Inputt.xlsx and do the desired changes inplace. Rather than creating a newsorted.xlsx
can you do the changes within the original xlsx.
Let me know if you have more questions :)
Addressing Issue #11
Added a folder 'Sort Excel File' with excel_sorter.py
This script reads input excel file, sorts according to Source and Destination column and then outputs a new excel file with sorted rows. This is achieved using pandas library.