Attached is the shorten script that facing difficulties.
import time
startTime = time.time()
print("8")
import pandas as pd
import numpy as np
print("9")
import datetime as dt
#import sys
import os
print("10")
import errno
from pathlib import Path
print("11")
import math
print("1")
path_input = input ("Enter the path of your file: ")
print("2")
in_data_folder = Path(path_input)
print("3")
file_input = input ("Enter the name of your file: ")
print("4")
in_path = in_data_folder / file_input
print("5")
zmm_raw = pd.read_csv(in_path)
print("6")
exclusion_path = input ("Enter the path of exlcusion file: ")
zmm_exlu = Path(exclusion_path + '/ rules .xlsx')
zmm_exclusion = pd.ExcelFile(zmm_exlu)
#define time
today = dt.datetime.today().strftime("%Y-%m-%d")
fileNameToday = dt.datetime.today().strftime("%d%m%y")
file_output = "/"+fileNameToday + "_"+ file_input[0:len(file_input)-4] + "_temp_action_output"
out_path = path_input + file_output +"//"
if not os.path.exists(os.path.dirname(out_path)):
try:
os.makedirs(os.path.dirname(out_path))
except OSError as exc: # Guard against race conditions
if exc.errno != errno.EEXIST:
raise
print('File reading is completed')