Skip to content

Sort Excel Sheet Hacktoberfest_Inputt.xls #20

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added sort_excel/Hacktoberfest_Inputt.xlsx
Binary file not shown.
Empty file added sort_excel/__init__.py
Empty file.
14 changes: 14 additions & 0 deletions sort_excel/excel_sorter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
@author: Ishita Mehta
"""

import pandas as pd

def sort_file(file_path):
dataframe = pd.read_excel(file_path)
sorted_dataframe = dataframe.sort_values(['Source', 'Destination'], ascending=[1, 1])
sorted_dataframe.to_excel('sorted_output_file.xlsx')


if __name__ == '__main__':
sort_file('Hacktoberfest_Inputt.xlsx')
3 changes: 3 additions & 0 deletions zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from openpyxl.styles import PatternFill, Font
# from openpyxl.styles import *
from openpyxl.utils.cell import get_column_letter
from sort_excel.excel_sorter import sort_file

ab = 1.2
c_green_a = [0, 1, 2, 3, 4, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 91, 92, 93, 94, 96, 97,
Expand Down Expand Up @@ -344,6 +345,8 @@ def main():

zone(ss_inp)
port_number(ss_inp)

sort_file('Hacktoberfest_Inputt.xlsx')

# app_name(ss_inp)
if __name__ == "__main__":
Expand Down