numpy – Python enhancement code

I have created simple code in which it takes flat file (txt) and eliminate the noise and error and only return clean rows, i.e. return flat file with the data I am interested in. it works fine but since I am a beginner I am sure my code is not efficient. I would appreciate if you can guide me into making it more professional and efficient – please be as brutal as you want, it will all add to my learning and development.

import pandas as pd
import numpy as np


def openFile(path, type):
    file = open(path,type)
    return file

def getFileDelim(f_path, f_del):
    file = openFile(f_path, 'r')
    lines = file.readlines()
    cnt_list = np.array((0))
    cnt_list = np.delete(cnt_list,0)

    for i in range(100):  
        cnt_list = np.append(cnt_list,lines(i).count(f_del))
    return np.bincount(cnt_list).argmax()

def getHeaders(f_path):
    file_o = openFile(f_path.replace('.txt', '_ok.txt'), 'r')
    file_o_ho = openFile(f_path.replace('.txt', '_ok_header_ok.txt'), 'w')
    file_o_hn = openFile(f_path.replace('.txt', '_ok_header_noise.txt'), 'w')

    lines = file_o.readlines()
    
    cnt = 0
    for line in lines:
        if cnt == 0:
           header = line
           file_o_ho.write(line)
        else:
            if line != header:
                file_o_ho.write(line)
            else:
                file_o_hn.write(line)
        cnt += 1





def fileProcessing(f_path, f_del, del_cnt):
    file = openFile(f_path, 'r')
    file_o = openFile(f_path.replace('.txt', '_ok.txt'), 'w')
    file_n = openFile(f_path.replace('.txt', '_noise.txt'), 'w')
    file_e = openFile(f_path.replace('.txt', '_error.txt'), 'w')
    
    lines = file.readlines()

    for line in lines:    
        if line.count("|") == del_cnt:
            file_o.write(line)
        elif line.count("|") > 0:
            file_n.write(line)
        elif line.count("|") == 0:
            file_e.write(line)

    header_process = input('Do you want to analyse the header record of this file (y/n)?:')
    if header_process.lower() == 'y' or header_process.lower() == 'yes':
        getHeaders(f_path)     

def generateReport(f_path, f_del, del_count):
    output = "File Processing report:n"
    output += "............................................................................................n"    
    output += "File Path: {}n".format(f_path)
    output += "Delimeter: {}n".format(f_del)
    output += "Delimeter Count: {}n".format(del_count)

    output += "n"


    file = openFile(f_path, 'r')
    file_o = openFile(f_path.replace('.txt', '_ok.txt'), 'r')
    file_n = openFile(f_path.replace('.txt', '_noise.txt'), 'r')
    file_e = openFile(f_path.replace('.txt', '_error.txt'), 'r')

    f_cnt = len(file.readlines())
    f_o_cnt = len(file_o.readlines())
    f_e_cnt = len(file_n.readlines())
    f_n_cnt = len(file_e.readlines())
    output += "Original File Line Count: {}n".format(f_cnt)
    output += "Number of ok lines: {}n".format(f_o_cnt)
    output += "Number of noise lines: {}n".format(f_n_cnt)
    output += "Number of error lines: {}n".format(f_e_cnt)
    output += "Total number of lines assessed: {}n".format(f_o_cnt + f_n_cnt + f_e_cnt)

    file_r = openFile(f_path.replace('.txt', '_report.txt'), 'w') 
    file_r.write(output)   

    return output

def main (f_path,f_del,del_cnt = None):
    if del_cnt == None:
        del_cnt = getFileDelim(f_path, f_del)
    fileProcessing(f_path, f_del, del_cnt)
    print(generateReport(f_path, f_del, del_cnt))

f_path = input("Please provide file path:").replace('"','')
f_del = input("Provide the delimeter:")


main(f_path,f_del)