<filename>contacts2csv.py
import pandas as pd
def contactsparser(excel_path,name):
    data = pd.read_excel(excel_path)
    data2 = pd.DataFrame(columns=['Name', 'Given Name', 'Additional Name', 'Family Name', 'Yomi Name',
       'Given Name Yomi', 'Additional Name Yomi', 'Family Name Yomi',
       'Name Prefix', 'Name Suffix', 'Initials', 'Nickname', 'Short Name',
       'Maiden Name', 'Birthday', 'Gender', 'Location', 'Billing Information',
       'Directory Server', 'Mileage', 'Occupation', 'Hobby', 'Sensitivity',
       'Priority', 'Subject', 'Notes', 'Language', 'Photo', 'Group Membership',
       'E-mail 1 - Type', 'E-mail 1 - Value', 'Phone 1 - Type',
       'Phone 1 - Value', 'Phone 2 - Type', 'Phone 2 - Value',
       'Phone 3 - Type', 'Phone 3 - Value', 'Organization 1 - Type',
       'Organization 1 - Name', 'Organization 1 - Yomi Name',
       'Organization 1 - Title', 'Organization 1 - Department',
       'Organization 1 - Symbol', 'Organization 1 - Location',
       'Organization 1 - Job Description'])
    if len(list(data.columns)) == 2:
        print('converting............')
        data.columns=['Name','Phone 1 - Value']
        maindata = pd.concat([data2,data],axis=0)
        fullname = name+".csv"
        maindata.to_csv(fullname)
    elif len(list(data.columns)) == 3:
        print('converting............')
        data.columns=['Name','Phone 1 - Value','Phone 2 - Value']
        maindata = pd.concat([data2,data],axis=0)
        fullname = name+".csv"
        maindata.to_csv(fullname)  
    else:
        print("Sorry , Not Supported")
    try:
        return maindata
    except:
        print("More features will be added soon")

<filename>contacts2csv.py
import pandas as pd
def contactsparser(excel_path,name):
    data = pd.read_excel(excel_path)
    data2 = pd.DataFrame(columns=['Name', 'Given Name', 'Additional Name', 'Family Name', 'Yomi Name',
       'Given Name Yomi', 'Additional Name Yomi', 'Family Name Yomi',
       'Name Prefix', 'Name Suffix', 'Initials', 'Nickname', 'Short Name',
       'Maiden Name', 'Birthday', 'Gender', 'Location', 'Billing Information',
       'Directory Server', 'Mileage', 'Occupation', 'Hobby', 'Sensitivity',
       'Priority', 'Subject', 'Notes', 'Language', 'Photo', 'Group Membership',
       'E-mail 1 - Type', 'E-mail 1 - Value', 'Phone 1 - Type',
       'Phone 1 - Value', 'Phone 2 - Type', 'Phone 2 - Value',
       'Phone 3 - Type', 'Phone 3 - Value', 'Organization 1 - Type',
       'Organization 1 - Name', 'Organization 1 - Yomi Name',
       'Organization 1 - Title', 'Organization 1 - Department',
       'Organization 1 - Symbol', 'Organization 1 - Location',
       'Organization 1 - Job Description'])
    if len(list(data.columns)) == 2:
        print('converting............')
        data.columns=['Name','Phone 1 - Value']
        maindata = pd.concat([data2,data],axis=0)
        fullname = name+".csv"
        maindata.to_csv(fullname)
    elif len(list(data.columns)) == 3:
        print('converting............')
        data.columns=['Name','Phone 1 - Value','Phone 2 - Value']
        maindata = pd.concat([data2,data],axis=0)
        fullname = name+".csv"
        maindata.to_csv(fullname)  
    else:
        print("Sorry , Not Supported")
    try:
        return maindata
    except:
        print("More features will be added soon")
