Created
September 5, 2023 13:55
-
-
Save SamarDeen/fd210f07d9e39072b019a5962ef24e4b to your computer and use it in GitHub Desktop.
The main function (simple)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import pandas as pd | |
import os | |
def Main(): | |
print("In the main function") | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--input_folder") | |
parser.add_argument("--input_file_name") | |
parser.add_argument("--output_folder") | |
args = parser.parse_args() | |
input_folder = args.input_folder | |
input_file_name = args.input_file_name | |
output_folder = args.output_folder | |
print(f"input_folder is {input_folder}") | |
mydf = pd.read_csv(os.path.join(input_folder, input_file_name)) | |
mydf.to_csv(os.path.join(output_folder,input_file_name)) | |
if(__name__ == "__main__"): | |
Main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment