User Tools

Site Tools


cdrs:index

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
cdrs:index [2024/10/08 12:44] – Fixed Overall antonio.andriychukcdrs:index [2026/04/09 10:18] (current) – removed sysadm
Line 1: Line 1:
-====== CDRs ====== 
-<code python> 
-# In order to let this script work, rename your downloaded file as "cdrs.csv" 
- 
-# Importing the library used mainly for this script, to install it use this command string(UNIX only) >> pip3 install pandas datetime 
-import pandas 
-import datetime 
-import numpy as np 
- 
- 
-# Creating the Dates used to rename the files at the end of the process 
-today = datetime.date.today() 
-first = today.replace(day=1) 
-last_month = first - datetime.timedelta(days=1) 
- 
-year = last_month.strftime("%Y") 
-month = last_month.strftime("%m") 
- 
-match month: 
-    case '01': 
-        month = 'January' 
-    case '02': 
-        month = 'February' 
-    case '03': 
-        month = 'March' 
-    case '04': 
-        month = 'April' 
-    case '05': 
-        month = 'May' 
-    case '06': 
-        month = 'June' 
-    case '07': 
-        month = 'July' 
-    case '08': 
-        month = 'August' 
-    case '09': 
-        month = 'September' 
-    case '10': 
-        month = 'October' 
-    case '11': 
-        month = 'November' 
-    case '12': 
-        month = 'December' 
-    case _: 
-        print("Check compiler, there might be an error...") 
- 
-# Declaring where GTT is included in the Check 
-gtt_check = input("Is GTT included in the check?: (Yes or No only) ") 
- 
-# If "Yes" is typed, this command that will include GTT will follow 
-if gtt_check == 'Yes' or gtt_check == 'yes' or gtt_check == 'y' or gtt_check == 'Y': 
-    gtt_cdr = pandas.read_csv('GTT/cdrs.csv', na_values = '0.0000') 
- 
-    redsun_gtt = (gtt_cdr.loc[(gtt_cdr['Calling Number'] == 41919803040) | (gtt_cdr['Calling Number'] == 4191960526) | (gtt_cdr['Calling Number'] == 334228490)].copy()) 
-    venistar_gtt = (gtt_cdr.loc[(gtt_cdr['Calling Number'] == 390418520093) | (gtt_cdr['Calling Number'] == 390418520043)].copy()) 
-    prysmian_fr = (gtt_cdr.loc[(gtt_cdr['Calling Number'] == 33184260199) | (gtt_cdr['Calling Number'] == 33422849010) | (gtt_cdr['Calling Number'] == 33428001800)].copy()) 
-    prysmian_br = (gtt_cdr.loc[(gtt_cdr['Calling Number'] == 551535000530)].copy()) 
- 
-    # Dividing the CDR per destination and creating a column with the outbound Traffic cost 
- 
-    # REDSUN - GTT 
-    def redsun_gtt_destinations(row): 
-        if 'SWITZERLAND' in row['Destination']: 
-            if 'SWITZERLAND_MOB' in row['Destination']: 
-                return row['Call Duration'] * 0.2090 / 60 
-            else: 
-                return row['Call Duration'] * 0.0285 / 60 
-        elif 'FRANCE' in row['Destination']: 
-            if 'FRANCE_MOB' in row['Destination']: 
-                return row['Call Duration'] * 0.0418 / 60 
-            else: 
-                return row['Call Duration'] * 0.100 / 60 
-        else: 
-            return row['Charge'] * 2 
- 
- 
-    redsun_gtt['Minute/Cost'] = round(redsun_gtt.apply(redsun_gtt_destinations, axis=1), 4) 
- 
-    # Venistar 
-    def venistar_gtt_destinations(row): 
-        if 'ITALY' in row['Destination']: 
-            if 'ITALY_MOB' in row['Destination']: 
-                return row['Call Duration'] * 0.045 / 60 
-            else: 
-                return row['Call Duration'] * 0.013 / 60 
-        else: 
-            return row['Charge'] * 2 
-    venistar_gtt['Minute/Cost'] = round(venistar_gtt.apply(venistar_gtt_destinations, axis=1), 4) 
- 
- 
-    # Retrieving the minutes for Prysmian 
-    # Prysmian France 
-    column_pry_fr = 'Call Duration' 
-    total_pry_fr = prysmian_fr[column_pry_fr].sum() 
-    conversion_pry_fr = total_pry_fr / 60 
-    minutes_pry_fr = round(conversion_pry_fr, 2) 
- 
-    # Prysmian Brasil 
-    column_pry_br = 'Call Duration' 
-    total_pry_br = prysmian_br[column_pry_br].sum() 
-    conversion_pry_br = total_pry_br / 60 
-    minutes_pry_br = round(conversion_pry_br, 2) 
- 
-    # Retireving cost for Prysmian 
-    # Prysmian FR 
-    column_pry_fr_cost = 'Charge' 
-    cost_pry_fr = prysmian_fr[column_pry_fr_cost].sum() 
-    prysmian_fr_cost = round(cost_pry_fr, 2) 
- 
-    # Prysmian BR 
-    column_pry_br_cost = 'Charge' 
-    cost_pry_br= prysmian_br[column_pry_br_cost].sum() 
-    prysmian_br_cost = round(cost_pry_br, 2) 
- 
- 
-    # Calculating the Costs per customer 
- 
-    # Redsun - Cost 
-    column_cost = 'Charge' 
-    sum_cost_redsun_gtt = redsun_gtt[column_cost].sum() 
-    redsun_gtt_cost = round(sum_cost_redsun_gtt, 2) 
- 
-    # Redsun - Reselling 
-    column_cost = 'Minute/Cost' 
-    sum_resell_redsun_gtt = redsun_gtt[column_cost].sum() 
-    redsun_gtt_resell = round(sum_resell_redsun_gtt, 2) 
- 
-    # Venistar - Cost 
-    column_cost = 'Charge' 
-    sum_cost_venistar_gtt = venistar_gtt[column_cost].sum() 
-    venistar_gtt_cost = round(sum_cost_venistar_gtt, 2) 
- 
-    # Venistar - Resell 
-    column_cost = 'Minute/Cost' 
-    sum_resell_venistar_gtt = venistar_gtt[column_cost].sum() 
-    venistar_gtt_resell = round(sum_resell_venistar_gtt, 2) 
- 
-    # Creating CDR for customers 
-    cdr_columns = ['Start Time (UTC)', 'Call Duration', 'Calling Number', 'Called Number', 'Destination', 'Minute/Cost'] 
-    redsun_gtt = redsun_gtt[cdr_columns] 
-    venistar_gtt = venistar_gtt[cdr_columns] 
- 
-    rename_columns = {'Start Time (UTC)': 'Date/Time', 'Call Duration': 'Duration', 'Calling Number': 'From', 'Called Number': 'To', 'Destination': 'Service Plan', 'Minute/Cost': 'Minute/Cost'} 
-    redsun_gtt = redsun_gtt.rename(columns=rename_columns) 
-    venistar_gtt = venistar_gtt.rename(columns=rename_columns) 
- 
-    redsun_gtt.to_csv(f"GTT/" + f"RedSun - CH-FR Outbound - {month} - {year}.csv", index=False) 
-    venistar_gtt.to_csv(f"GTT/" + f"Venistar - ITA Outbound - {month} - {year}.csv", index=False) 
- 
-    print("\n \n**** GTT ****") 
-    print(f"\n \nPrysmian FR: \n Minutes: {minutes_pry_fr} \n Cost: {prysmian_fr_cost} \n \n Prysmian BR: \n Minutes: {minutes_pry_br} \n Cost: {prysmian_br_cost}  \n \n \n Cost per Customers \n \n REDSUN \n Carrier Cost: {redsun_gtt_cost} \n Reselling Cost: {redsun_gtt_resell} \n \n VENISTAR \n Carrier Cost: {venistar_gtt_cost} \n Reselling Cost: {venistar_gtt_resell} \n \n \n \n") 
- 
- 
-# If anything else is typed, the instruction will continue without GTT 
-else: 
-    pass 
- 
-# First extraction of the file using pandas library, and creating the object to create the CDR 
-voxbone_cdr = pandas.read_csv('Voxbone/cdrs.csv', engine='python') 
-irideos_green_cdr = pandas.read_csv('Irideos/cdrs_green.csv', sep='\t', decimal='.') 
-irideos_cdr = pandas.read_csv('Irideos/cdrs.csv', sep='\t', decimal='.') 
- 
-# TOLL-FREE 
- 
-e80_green_vox = (voxbone_cdr.loc[(voxbone_cdr['To'].str.contains("18773580462")) | (voxbone_cdr['To'].str.contains("611800957440"))].copy()) 
-e80_green_iri = (irideos_green_cdr.loc[(irideos_green_cdr['Nv'].str.contains("800190521"))].copy()) 
-farmacie_green = (irideos_green_cdr.loc[(irideos_green_cdr['Nv'].str.contains("800943081"))].copy()) 
-metanonord_green = (irideos_green_cdr.loc[(irideos_green_cdr['Nv'].str.contains("800190523"))].copy()) 
-oltreta_green = (irideos_green_cdr.loc[(irideos_green_cdr['Nv'].str.contains("800193893"))].copy()) 
- 
- 
-# OUTBOUND 
- 
-# Alidays 
-alidays = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("0299220044")) | (irideos_cdr['A_Subscriber_No'].str.contains("02872384"))].copy()) 
- 
-#Beeasy 
-beeasy_iri = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("038319401")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100131"))].copy()) 
-beeasidata_iri = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("03821788888")) | (irideos_cdr['A_Subscriber_No'].str.contains("01431990018")) | (irideos_cdr['A_Subscriber_No'].str.contains("01411930123")) | (irideos_cdr['A_Subscriber_No'].str.contains("01411930124")) | (irideos_cdr['A_Subscriber_No'].str.contains("01411930125"))].copy()) 
- 
-# Careapt 
-careapt = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("0221079070")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079073")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079919")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079966")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079997"))].copy()) 
- 
-# E80 
-e80_vox = (voxbone_cdr.loc[(voxbone_cdr['From'].str.contains("12244703031")) | (voxbone_cdr['From'].str.contains("61283111046")) | (voxbone_cdr['From'].str.contains("5117064228"))].copy()) 
-e80_iri = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("05221770290"))].copy()) 
- 
-# Farmacie Italiane 
-farmacie = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("0620190197"))].copy()) 
- 
-# Fives 
-fives_vox = (voxbone_cdr.loc[(voxbone_cdr['From'].str.contains("33481683023"))].copy()) 
-fives_iri = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("03311660533"))].copy()) 
- 
-# Giuffre' 
-giuffre = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("0221079904")) | (irideos_cdr['A_Subscriber_No'].str.contains("02896174")) | (irideos_cdr['A_Subscriber_No'].str.contains("0733270561"))].copy()) 
- 
-# Golilla 
-golilla = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("0221100013")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100099")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100101")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100102"))].copy()) 
- 
-# Lario Reti Holding 
-lrh = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("03411790060")) | (irideos_cdr['A_Subscriber_No'].str.contains("03411790061"))].copy()) 
- 
-# Nuovo Consorzio Informatico 
-nci = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("0221100617")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100661")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100671")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100762")) | (irideos_cdr['A_Subscriber_No'].str.contains("0283905328")) | (irideos_cdr['A_Subscriber_No'].str.contains("0283905334")) | (irideos_cdr['A_Subscriber_No'].str.contains("0283905393")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612155")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612155")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612160")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612191")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612280")) | (irideos_cdr['A_Subscriber_No'].str.contains("0299220027")) | (irideos_cdr['A_Subscriber_No'].str.contains("0299220036")) | (irideos_cdr['A_Subscriber_No'].str.contains("0299220063")) | (irideos_cdr['A_Subscriber_No'].str.contains("0299220036")) | (irideos_cdr['A_Subscriber_No'].str.contains("0299220066")) | (irideos_cdr['A_Subscriber_No'].str.contains("0299220083"))].copy()) 
- 
-# OCME 
-ocme_vox = (voxbone_cdr.loc[(voxbone_cdr['From'].str.contains("14803517247")) | (voxbone_cdr['From'].str.contains("34911981094")) | (voxbone_cdr['From'].str.contains("441480276794")) | (voxbone_cdr['From'].str.contains("442038159512")) | (voxbone_cdr['From'].str.contains("525511638786")) | (voxbone_cdr['From'].str.contains("551141300919")) | (voxbone_cdr['From'].str.contains("61290994319")) | (voxbone_cdr['From'].str.contains("6624304079")) | (voxbone_cdr['From'].str.contains("27120042215"))].copy()) 
-ocme_iri = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("05211480017")) | (irideos_cdr['A_Subscriber_No'].str.contains("0694502247"))].copy()) 
- 
-# Omega3C - Microdata 
-omega3c = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("0289617521")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079505")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289617566")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079508")) | (irideos_cdr['A_Subscriber_No'].str.contains("0282950165")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079965")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079917")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079160")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079582")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079161")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079580")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079682")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079581")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079582")) | (irideos_cdr['A_Subscriber_No'].str.contains("0294757684")) | (irideos_cdr['A_Subscriber_No'].str.contains("0294750682")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079194")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079682")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079690")) | (irideos_cdr['A_Subscriber_No'].str.contains("0294758919")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612129")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289617520")) | (irideos_cdr['A_Subscriber_No'].str.contains("0282952627")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221070166")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079691")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079903")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079504")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079076")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079071")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079075")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079077")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079074")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079509")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079193")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221079909")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100741")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100768")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100909"))].copy()) 
- 
-# Prysmian 
-prysmian_ib = (voxbone_cdr.loc[(voxbone_cdr['From'].str.contains("34932201492")) | (voxbone_cdr['From'].str.contains("34932713140")) | (voxbone_cdr['From'].str.contains("34932713140"))].copy()) 
-prysmian_uk = (voxbone_cdr.loc[(voxbone_cdr['From'].str.contains("442381680800"))].copy()) 
- 
-# RedSun 
-redsun_vox = (voxbone_cdr.loc[(voxbone_cdr['From'].str.contains("390282954720"))].copy()) 
-redsun_iri = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("0510910255")) | (irideos_cdr['A_Subscriber_No'].str.contains("0521832"))].copy()) 
- 
-# S2C 
-s2c_iri = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("0110721021")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232000")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221103032")) | (irideos_cdr['A_Subscriber_No'].str.contains("0510910599")) | (irideos_cdr['A_Subscriber_No'].str.contains("0912570202")) | (irideos_cdr['A_Subscriber_No'].str.contains("0510070136"))].copy()) 
- 
-# Service Credit 
-servicecredit = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("0221100381")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100337")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232224")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232089")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232067")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620192861")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100319")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612172")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620192899")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232213")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100228")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612188")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620192836")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232047")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620195032")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620195067")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232097")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100623")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100338")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620192887")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100669")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620192884")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232208")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612264")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612230")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232210")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620195017")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612196")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232203")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612231")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620195069")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620192809")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612255")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100608")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612232")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612193")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232002")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612267")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100316")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100232")) | (irideos_cdr['A_Subscriber_No'].str.contains("0299220079")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620195623")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612245")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232013")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100903")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612238")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698240810")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698240828")) | (irideos_cdr['A_Subscriber_No'].str.contains("0299220056")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620195049")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100739")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698240812")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100787")) | (irideos_cdr['A_Subscriber_No'].str.contains("0620195938")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698240811")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232046")) | (irideos_cdr['A_Subscriber_No'].str.contains("0221100789")) | (irideos_cdr['A_Subscriber_No'].str.contains("0698232058")) | (irideos_cdr['A_Subscriber_No'].str.contains("0289612176")) | (irideos_cdr['A_Subscriber_No'].str.contains("0299220204")) ].copy()) 
- 
-# Venistar 
-venistar_iri = (irideos_cdr.loc[(irideos_cdr['A_Subscriber_No'].str.contains("0412530036")) | (irideos_cdr['A_Subscriber_No'].str.contains("0412530038")) | (irideos_cdr['A_Subscriber_No'].str.contains("0412530063"))].copy()) 
- 
- 
-# Dividing the CDR per destination and creating a column with the outbound Traffic cost 
- 
-# E80 - VOXBONE- TOLL-FREE 
-def e80_green_vox_destinations(row): 
-    if 'CAN' in row['Country (Calling To)']: 
-        if 'Fixed' in row['Caller Type (CPC)']: 
-            return float(row['Duration']) * 0.0143 / 60 
-        elif 'Mobile' in row['Caller Type (CPC)']: 
-            return float(row['Duration']) * 0.0340 / 60 
-        else: 
-            return float(row['Cost']) * 2 
-    if 'AUS' in row['Country (Calling To)']: 
-        # MOBILE 
-        if row['From'].startswith("0061"): 
-            if row['From'].startswith("00614"): 
-                return float(row['Duration']) * 0.0572 / 60 
-            else: 
-                return float(row['Duration']) * 0.0580 / 60 
-        else: 
-            return float(row['Cost']) * 2 
-    else: 
-        return float(row['Cost']) * 2 
- 
-e80_green_vox['Minute/Cost'] = round(e80_green_vox.apply(e80_green_vox_destinations, axis=1), 4) 
- 
-# E80 - IRIDEOS - TOLL-FREE 
-def e80_green_iri_destinations(row): 
-    if 'ITALIA' in row['Destination']: 
-        return float(row['Call_Duration']) * 0.0152 / 60 
-    elif 'ITALY-MOBILE' in row['Destination']: 
-        return float(row['Call_Duration']) * 0.1109 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-e80_green_iri['Minute/Cost'] = round(e80_green_iri.apply(e80_green_iri_destinations, axis=1), 4) 
- 
-def farmacie_green_destinations(row): 
-    if 'ITALIA' in row['Destination']: 
-        return float(row['Call_Duration']) * 0.0148 / 60 
-    elif 'ITALY-MOBILE' in row['Destination']: 
-        return float(row['Call_Duration']) * 0.1109 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-farmacie_green['Minute/Cost'] = round(farmacie_green.apply(farmacie_green_destinations, axis=1), 4) 
- 
-def metanonord_green_destinations(row): 
-    if 'ITALIA' in row['Destination']: 
-         return float(row['Call_Duration']) * 0.0148 / 60 
-    elif 'ITALY-MOBILE' in row['Destination']: 
-        return float(row['Call_Duration']) * 0.1109 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-metanonord_green['Minute/Cost'] = round(metanonord_green.apply(metanonord_green_destinations, axis=1), 4) 
- 
- 
-def oltreta_green_destinations(row): 
-    if 'ITALIA' in row['Destination']: 
-         return float(row['Call_Duration']) * 0.0148 / 60 
-    elif 'ITALY-MOBILE' in row['Destination']: 
-        return float(row['Call_Duration']) * 0.1109 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-oltreta_green['Minute/Cost'] = round(oltreta_green.apply(oltreta_green_destinations, axis=1), 4) 
- 
-# OUTBOUND 
- 
-# Alidays 
-def alidays_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0350 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-alidays['Minute/Cost'] = round(alidays.apply(alidays_destinations, axis=1), 4) 
- 
-# Beeasy 
-def beeasy_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0350 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-beeasy_iri['Minute/Cost'] = round(beeasy_iri.apply(beeasy_destinations, axis=1), 4) 
- 
-# Beeasy - Isidata 
-def beeasidata_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0415 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.0196 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0415 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-beeasidata_iri['Minute/Cost'] = round(beeasidata_iri.apply(beeasidata_destinations, axis=1), 4) 
- 
-# Careapt 
-def careapt_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0350 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-careapt['Minute/Cost'] = round(careapt.apply(careapt_destinations, axis=1), 4) 
- 
-#E80 - VOXBONE 
- 
-def e80_vox_destination(row): 
-    if 'CAN' in str(row['Country (Calling To)']): 
-        return float(row['Duration']) * 0.0102 / 60 
-    elif 'USA' in str(row['Country (Calling To)']): 
-        return float(row['Duration']) * 0.0102 / 60 
-    elif 'MEX' in str(row['Country (Calling To)']): 
-        return float(row['Duration']) * 0.4400 / 60 
-    elif 'AUS' in str(row['Country (Calling To)']): 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("Australia Mobile") or row['Service Plan Name'].startswith("Australia - Mobile")): 
-            return float(row['Duration']) * 0.0528 / 60 
-        elif isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("Australia Fixed") or row['Service Plan Name'] == "Australia" or row['Service Plan Name'] == "Australia - Canberra" or row['Service Plan Name'] == "Australia - Melbourne" or row['Service Plan Name'] == "Australia - Sydney"): 
-            return float(row['Duration']) * 0.0211 / 60 
-        else: 
-            return float(row['Cost']) * 2 
-    elif 'PER' in str(row['Country (Calling To)']): 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("Peru - Mobile")): 
-            return float(row['Duration']) * 0.0196 / 60 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'] == 'Peru' or row['Service Plan Name'] == 'Peru - Lima'): 
-            return float(row['Duration']) * 0.0102 / 60 
-        else: 
-            return float(row['Cost']) * 2 
-    else: 
-        return float(row['Cost']) * 2 
- 
-e80_vox['Minute/Cost'] = round(e80_vox.apply(e80_vox_destination, axis=1), 4) 
- 
- 
-# E80 - IRIDEOS 
-def e80_iri_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0219 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.008 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0219 / 60 
-    elif 'Mexico' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.44 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-e80_iri['Minute/Cost'] = round(e80_iri.apply(e80_iri_destinations, axis=1), 4) 
- 
-# Farmacie 
-def farmacie_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0350 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-farmacie['Minute/Cost'] = round(farmacie.apply(farmacie_destinations, axis=1), 4) 
- 
-# FIVES - VOXBONE 
-def fives_vox_destinations(row): 
-    if 'DEU' in row['Country (Calling To)']: 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("Germany Mobile")): 
-            return float(row['Duration']) * 0.0458 / 60 
-        elif isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'] == "Germany Fixed" or row['Service Plan Name'] == "Germany"): 
-            return float(row['Duration']) * 0.0126 / 60 
-        else: 
-            return float(row['Cost']) * 2 
-    elif 'FRA' in row['Country (Calling To)']: 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("France Mobile") or row['Service Plan Name'].startswith("France - Mobile")): 
-            return float(row['Duration']) * 0.0418 / 60 
-        elif isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("France Fixed") or row['Service Plan Name'] == "France - Orange" or row['Service Plan Name'] == "France"): 
-            return float(row['Duration']) * 0.0100 / 60 
-        else: 
-            return float(row['Cost'])* 2 
-    else: 
-        return float(row['Cost']) * 2 
- 
-fives_vox['Minute/Cost'] = round(fives_vox.apply(fives_vox_destinations, axis=1), 4) 
- 
- 
-# Fives - IRIDEOS 
-def fives_iri_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0350 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-fives_iri['Minute/Cost'] = round(fives_iri.apply(fives_iri_destinations, axis=1), 4) 
- 
-# Giuffré 
-def giuffre_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0350 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-giuffre['Minute/Cost'] = round(giuffre.apply(giuffre_destinations, axis=1), 4) 
- 
-# Golilla 
-def golilla_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0350 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-golilla['Minute/Cost'] = round(golilla.apply(golilla_destinations, axis=1), 4) 
- 
-# LRH 
-def lrh_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0350 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-lrh['Minute/Cost'] = round(lrh.apply(lrh_destinations, axis=1), 4) 
- 
-# NCI 
-if nci.empty == False: 
-    def nci_destinations(row): 
-        if 'ITALIA' in str(row['Destination']): 
-                if 'ITALIA -' in str(row['Destination']): 
-                    return float(row['Revenue']) * 2 
-                elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-                    return float(row['Call_Duration']) * 0.0350 / 60 
-                else: 
-                    return float(row['Call_Duration']) * 0.013 / 60 
-        elif 'ITALY-MOBILE' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Revenue']) * 2 
- 
-    nci['Minute/Cost'] = round(nci.apply(nci_destinations, axis=1), 4) 
-else: 
-    pass 
- 
-# OCME - VOXBONE 
- 
-def ocme_vox_destinations(row): 
-    if isinstance(row['Country (Calling To)'], str) and 'MEX' in row['Country (Calling To)']: 
-        if row['Number Type'] == 'MOBILE': 
-            return float(row['Duration']) * 0.0447 / 60 
-        elif row['Number Type'] == 'GEOGRAPHIC': 
-            return float(row['Duration']) * 0.0288 / 60 
-        else: 
-            return row['Cost'] * 2 
-    elif isinstance(row['Country (Calling To)'], str) and 'ESP' in row['Country (Calling To)']: 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("Spain Mobile") or row['Service Plan Name'].startswith("Spain - Mobile")): 
-            return float(row['Duration']) * 0.0666 / 60 
-        elif isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'] == 'Spain' or row['Service Plan Name'] == 'Spain - Madrid' or row['Service Plan Name'].startswith("Spain Fixed")): 
-            return float(row['Duration']) * 0.0276 / 60 
-        else: 
-            return row['Cost'] * 2 
-    elif isinstance(row['Country (Calling To)'], str) and 'GBR' in row['Country (Calling To)']: 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("UK Mobile") or row['Service Plan Name'].startswith('UK - Mobile')): 
-            return float(row['Duration']) * 0.0300 / 60 
-        elif isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith('UK Fixed') or row['Service Plan Name'] == 'UK' or row['Service Plan Name'] == 'UK - BT' or row['Service Plan Name'] == 'UK - Gamma' or row['Service Plan Name'] == 'UK - Guernsey' or row['Service Plan Name'] == 'UK - Isle of Man' or row['Service Plan Name'] == 'UK - Jersey' or row['Service Plan Name'] == 'UK - Vodafone' or row['Service Plan Name'] == 'UK - Wide' or row['Service Plan Name'] == 'UK Islands'): 
-            return float(row['Duration']) * 0.0114 / 60 
-        else: 
-            return row['Cost'] * 2 
-    elif isinstance(row['Country (Calling To)'], str) and 'ZAF' in row['Country (Calling To)']: 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith('South Africa - Mobile')): 
-            return float(row['Duration']) * 0.4455 / 60 
-        elif isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'] == 'South Africa' or row['Service Plan Name'] == 'South Africa - Cape Town' or row['Service Plan Name'] == 'South Africa - Johannesburg'): 
-            return float(row['Duration']) * 0.4152 / 60 
-        else: 
-            return row['Cost'] * 2 
-    elif isinstance(row['Country (Calling To)'], str) and 'THA' in row['Country (Calling To)']: 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'] == 'Thailand - Mobile'): 
-            return float(row['Duration']) * 0.2073 / 60 
-        elif isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'] == 'Thailand' or row['Service Plan Name'] == 'Bangkok'): 
-            return float(row['Duration']) * 0.2163 / 60 
-        else: 
-            return row['Cost'] * 2 
-    elif isinstance(row['Country (Calling To)'], str) and 'USA' in row['Country (Calling To)']: 
-        if row['Number Type'] == 'MOBILE': 
-            return float(row['Duration']) * 0.0288 / 60 
-        elif row['Number Type'] == 'GEOGRAPHIC': 
-            return float(row['Duration']) * 0.0243 / 60 
-        else: 
-            return row['Cost'] * 2 
-    elif isinstance(row['Country (Calling To)'], str) and 'AUS' in row['Country (Calling To)']: 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("Australia Mobile") or row['Service Plan Name'].startswith("Australia - Mobile")): 
-            return float(row['Duration']) * 0.0681 / 60 
-        elif isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("Australia Fixed") or row['Service Plan Name'] == "Australia" or row['Service Plan Name'] == "Australia - Canberra" or row['Service Plan Name'] == "Australia - Melbourne" or row['Service Plan Name'] == "Australia - Sydney"): 
-            return float(row['Duration']) * 0.0402 / 60 
-        else: 
-            return float(row['Cost']) * 2 
-    else: 
-        return float(row['Cost']) *  2 
- 
-ocme_vox['Minute/Cost'] = round(ocme_vox.apply(ocme_vox_destinations, axis=1), 4) 
- 
-# OCME - IRIDEOS 
-def ocme_iri_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0350 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-ocme_iri['Minute/Cost'] = round(ocme_iri.apply(ocme_iri_destinations, axis=1), 4) 
- 
- 
-# Omega3c 
-def omega3c_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0350 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-omega3c['Minute/Cost'] = round(omega3c.apply(omega3c_destinations, axis=1), 4) 
- 
- 
-# REDSUN - VOXBONE 
-def redsun_vox_destinations(row): 
-    if 'ITA' in str(row['Country (Calling To)']): 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("Italy Mobile") or row['Service Plan Name'].startswith("Italy - Mobile")): 
-            return float(row['Duration']) * 0.0380 / 60 
-        elif isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("Italy Fixed") or row['Service Plan Name'] == 'Italy' or row['Service Plan Name'] == 'Italy - Milan' or row['Service Plan Name'] == 'Italy - Rome'): 
-            return float(row['Duration']) * 0.0100 / 60 
-        else: 
-            return float(row['Cost']) * 2 
-    elif 'FRA' in str(row['Country (Calling To)']): 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("France Mobile") or row['Service Plan Name'].startswith("France - Mobile")): 
-            return float(row['Duration']) * 0.0418 / 60 
-        elif isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("France Fixed") or row['Service Plan Name'] == "France - Orange" or row['Service Plan Name'] == "France"): 
-            return float(row['Duration']) * 0.0100 / 60 
-        else: 
-            return float(row['Cost']) * 2 
-    elif 'CHE' in str(row['Country (Calling To)']): 
-        if isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("Switzerland - Mobile") or row['Service Plan Name'].startswith("Switzerland Mobile")): 
-            return float(row['Duration']) * 0.2090 / 60 
-        elif isinstance(row['Service Plan Name'], str) and (row['Service Plan Name'].startswith("Switzerland Fixed") or row['Service Plan Name'] == 'Switzerland' or row['Service Plan Name'] == 'Switzerland - Berne' or row['Service Plan Name'] == 'Switzerland - Geneva' or row['Service Plan Name'] == 'Switzerland - Zurich'): 
-            return float(row['Duration']) * 0.0285 / 60 
-        else: 
-            return float(row['Cost']) * 2 
-    else: 
-        return float(row['Cost']) * 2 
- 
-redsun_vox['Minute/Cost'] = round(redsun_vox.apply(redsun_vox_destinations, axis=1), 4) 
- 
-# REDSUN - IRIDEOS 
-def redsun_iri_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0312 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.010 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0312 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-redsun_iri['Minute/Cost'] = round(redsun_iri.apply(redsun_iri_destinations, axis=1), 4) 
- 
-# S2C 
-def s2c_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0350 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-s2c_iri['Minute/Cost'] = round(s2c_iri.apply(s2c_destinations, axis=1), 4) 
- 
-# ServiceCredit 
-def servicecredit_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0350 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0350 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-servicecredit['Minute/Cost'] = round(servicecredit.apply(servicecredit_destinations, axis=1), 4) 
- 
-# VENISTAR - IRIDEOS 
-def venistar_iri_destinations(row): 
-    if 'ITALIA' in str(row['Destination']): 
-        if 'ITALIA -' in str(row['Destination']): 
-            return float(row['Revenue']) * 2 
-        elif 'ITALY-MOBILE-WELCOME ITALIA' in str(row['Destination']): 
-            return float(row['Call_Duration']) * 0.0450 / 60 
-        else: 
-            return float(row['Call_Duration']) * 0.013 / 60 
-    elif 'ITALY-MOBILE' in str(row['Destination']): 
-        return float(row['Call_Duration']) * 0.0450 / 60 
-    else: 
-        return float(row['Revenue']) * 2 
- 
-venistar_iri['Minute/Cost'] = round(venistar_iri.apply(venistar_iri_destinations, axis=1), 4) 
- 
-# Calculating the Costs per customer 
-# E80 - VOXBONE - TOLL-FREE - Cost 
-column_cost = 'Cost' 
-e80_green_vox[column_cost] = pandas.to_numeric(e80_green_vox[column_cost], errors='coerce') 
-sum_cost_e80_green_vox = e80_green_vox[column_cost].sum() 
-e80_green_vox_cost = round(sum_cost_e80_green_vox, 2) 
- 
-# E80 - VOXBONE - TOLL-FREE - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_e80_green_vox = e80_green_vox[column_cost].sum() 
-e80_green_resell_vox = round(sum_resell_e80_green_vox, 2) 
- 
-# E80 - IRIDEOS - TOLL-FREE - Cost 
-column_cost = 'Revenue' 
-e80_green_iri[column_cost] = pandas.to_numeric(e80_green_iri[column_cost], errors='coerce') 
-sum_cost_e80_green_iri = e80_green_iri[column_cost].sum() 
-e80_green_cost_iri = round(sum_cost_e80_green_iri, 2) 
- 
-# E80 - IRIDEOS - TOLL-FREE - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_e80_green_iri = e80_green_iri[column_cost].sum() 
-e80_green_resell_iri = round(sum_resell_e80_green_iri, 2) 
- 
-# Farmacie - TOLL-FREE - Cost 
-column_cost = 'Revenue' 
-farmacie_green[column_cost] = pandas.to_numeric(farmacie_green[column_cost], errors='coerce') 
-sum_cost_farmacie_green = farmacie_green[column_cost].sum() 
-farmacie_green_cost = round(sum_cost_farmacie_green, 2) 
- 
-# Farmacie - TOLL-FREE - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_farmacie_green = farmacie_green[column_cost].sum() 
-farmacie_green_resell = round(sum_resell_farmacie_green, 2) 
- 
-# MetanoNord - TOLL-FREE - Cost 
-column_cost = 'Revenue' 
-metanonord_green[column_cost] = pandas.to_numeric(metanonord_green[column_cost], errors='coerce') 
-sum_cost_metanonord_green = metanonord_green[column_cost].sum() 
-metanonord_green_cost = round(sum_cost_metanonord_green, 2) 
- 
-# MetanoNord - TOLL-FREE - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_metanonord_green = metanonord_green[column_cost].sum() 
-metanonord_green_resell = round(sum_resell_metanonord_green, 2) 
- 
-# Oltreta - TOLL-FREE - Cost 
-column_cost = 'Revenue' 
-oltreta_green[column_cost] = pandas.to_numeric(oltreta_green[column_cost], errors='coerce') 
-sum_cost_oltreta_green = oltreta_green[column_cost].sum() 
-oltreta_green_cost = round(sum_cost_oltreta_green, 2) 
- 
-# Oltreta - TOLL-FREE - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_oltreta_green = oltreta_green[column_cost].sum() 
-oltreta_green_resell = round(sum_resell_oltreta_green, 2) 
- 
- 
-# OUTBOUND 
- 
-# Alidays - Cost 
-column_cost = 'Revenue' 
-alidays[column_cost] = pandas.to_numeric(alidays[column_cost], errors='coerce') 
-sum_cost_alidays = alidays[column_cost].sum() 
-alidays_cost = round(sum_cost_alidays, 2) 
- 
-# Alidays - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_alidays = alidays[column_cost].sum() 
-alidays_resell = round(sum_resell_alidays, 2) 
- 
- 
-# Beeasy - Cost 
-column_cost = 'Revenue' 
-beeasy_iri[column_cost] = pandas.to_numeric(beeasy_iri[column_cost], errors='coerce') 
-sum_cost_beeasy = beeasy_iri[column_cost].sum() 
-beeasy_cost = round(sum_cost_beeasy, 2) 
- 
-# Beeasy - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_beeasy = beeasy_iri[column_cost].sum() 
-beeasy_resell = round(sum_resell_beeasy, 2) 
- 
- 
-# Beeasy - Isidata - Cost 
-column_cost = 'Revenue' 
-beeasidata_iri[column_cost] = pandas.to_numeric(beeasidata_iri[column_cost], errors='coerce') 
-sum_cost_beeasidata = beeasidata_iri[column_cost].sum() 
-beeasidata_cost = round(sum_cost_beeasidata, 2) 
- 
-# Beeasy - Isidata - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_beeasidata = beeasidata_iri[column_cost].sum() 
-beeasidata_resell = round(sum_resell_beeasidata, 2) 
- 
- 
-# Careapt - Cost 
-column_cost = 'Revenue' 
-careapt[column_cost] = pandas.to_numeric(careapt[column_cost], errors='coerce') 
-sum_cost_careapt = careapt[column_cost].sum() 
-careapt_cost = round(sum_cost_careapt, 2) 
- 
-# Careapt - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_careapt = careapt[column_cost].sum() 
-careapt_resell = round(sum_resell_careapt, 2) 
- 
- 
-# E80 - VOXBONE - Cost 
-column_cost = 'Cost' 
-e80_vox[column_cost] = pandas.to_numeric(e80_vox[column_cost], errors='coerce') 
-sum_cost_e80_vox = e80_vox[column_cost].sum() 
-e80_vox_cost = round(sum_cost_e80_vox, 2) 
- 
-# E80 - VOXBONE - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_e80_vox = e80_vox[column_cost].sum() 
-e80_vox_resell = round(sum_resell_e80_vox, 2) 
- 
-# E80 - IRIDEOS - Cost 
-column_cost = 'Revenue' 
-e80_iri[column_cost] = pandas.to_numeric(e80_iri[column_cost], errors='coerce') 
-sum_cost_e80_iri = e80_iri[column_cost].sum() 
-e80_iri_cost = round(sum_cost_e80_iri, 2) 
- 
-# E80 - IRIDEOS - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_e80_iri = e80_iri[column_cost].sum() 
-e80_iri_resell = round(sum_resell_e80_iri, 2) 
- 
- 
-# Farmacie - Cost 
-column_cost = 'Revenue' 
-farmacie[column_cost] = pandas.to_numeric(farmacie[column_cost], errors='coerce') 
-sum_cost_farmacie = farmacie[column_cost].sum() 
-farmacie_cost = round(sum_cost_farmacie, 2) 
- 
-# Farmacie - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_farmacie = farmacie[column_cost].sum() 
-farmacie_resell = round(sum_resell_farmacie, 2) 
- 
- 
-# Fives - VOXBONE - Cost 
-column_cost = 'Cost' 
-fives_vox[column_cost] = pandas.to_numeric(fives_vox[column_cost], errors='coerce') 
-sum_cost_fives_vox = fives_vox[column_cost].sum() 
-fives_vox_cost = round(sum_cost_fives_vox, 2) 
- 
-# Fives - VOXBONE - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_fives_vox = fives_vox[column_cost].sum() 
-fives_vox_resell = round(float(sum_resell_fives_vox), 2) 
- 
- 
-# Fives - IRIDEOS - Cost 
-column_cost = 'Revenue' 
-fives_iri[column_cost] = pandas.to_numeric(fives_iri[column_cost], errors='coerce') 
-sum_cost_fives_iri = fives_iri[column_cost].sum() 
-fives_iri_cost = round(sum_cost_fives_iri, 2) 
- 
-# Fives - IRIDEOS - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_fives_iri = fives_iri[column_cost].sum() 
-fives_iri_resell = round(sum_resell_fives_iri, 2) 
- 
- 
-# Giuffre - Cost 
-column_cost = 'Revenue' 
-giuffre[column_cost] = pandas.to_numeric(giuffre[column_cost], errors='coerce') 
-sum_cost_giuffre = giuffre[column_cost].sum() 
-giuffre_cost = round(sum_cost_giuffre, 2) 
- 
-# Giuffre - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_giuffre = giuffre[column_cost].sum() 
-giuffre_resell = round(sum_resell_giuffre, 2) 
- 
- 
-# Golilla - Cost 
-column_cost = 'Revenue' 
-golilla[column_cost] = pandas.to_numeric(golilla[column_cost], errors='coerce') 
-sum_cost_golilla = golilla[column_cost].sum() 
-golilla_cost = round(sum_cost_golilla, 2) 
- 
-# Golilla - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_golilla = golilla[column_cost].sum() 
-golilla_resell = round(sum_resell_golilla, 2) 
- 
- 
-# LRH - Cost 
-column_cost = 'Revenue' 
-lrh[column_cost] = pandas.to_numeric(lrh[column_cost], errors='coerce') 
-sum_cost_lrh = lrh[column_cost].sum() 
-lrh_cost = round(sum_cost_lrh, 2) 
- 
-# LRH - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_lrh = lrh[column_cost].sum() 
-lrh_resell = round(sum_resell_lrh, 2) 
- 
- 
-if nci.empty == False: 
-    # NCI - Cost 
-    column_cost = 'Revenue' 
-    nci[column_cost] = pandas.to_numeric(nci[column_cost], errors='coerce') 
-    sum_cost_nci = nci[column_cost].sum() 
-    nci_cost = round(sum_cost_nci, 2) 
- 
-    # NCI - Reselling 
-    column_cost = 'Minute/Cost' 
-    sum_resell_nci = nci[column_cost].sum() 
-    nci_resell = round(sum_resell_nci, 2) 
-else: 
-    nci_cost = 0 
-    nci_resell = 0 
- 
-# OCME - VOXBONE - Cost 
-column_cost = 'Cost' 
-ocme_vox[column_cost] = pandas.to_numeric(ocme_vox[column_cost], errors='coerce') 
-sum_cost_ocme_vox = ocme_vox[column_cost].sum() 
-ocme_vox_cost = round(sum_cost_ocme_vox, 2) 
- 
-# OCME - VOXBONE - Reselling 
-column_cost = 'Minute/Cost' 
-numeric_values = pandas.to_numeric(ocme_vox[column_cost], errors='coerce') 
-sum_resell_ocme_vox = np.sum(numeric_values) 
-ocme_vox_resell = round(sum_resell_ocme_vox, 2) 
- 
-# OCME - IRIDEOS - Cost 
-column_cost = 'Revenue' 
-ocme_iri[column_cost] = pandas.to_numeric(ocme_iri[column_cost], errors='coerce') 
-sum_cost_ocme_iri = ocme_iri[column_cost].sum() 
-ocme_iri_cost = round(sum_cost_ocme_iri, 2) 
- 
-# OCME - IRIDEOS - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_ocme_iri = ocme_iri[column_cost].sum() 
-ocme_iri_resell = round(sum_resell_ocme_iri, 2) 
- 
- 
-# Omega3c - Cost 
-column_cost = 'Revenue' 
-omega3c[column_cost] = pandas.to_numeric(omega3c[column_cost], errors='coerce') 
-sum_cost_omega3c = omega3c[column_cost].sum() 
-omega3c_cost = round(sum_cost_omega3c, 2) 
- 
-# omega3c - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_omega3c = omega3c[column_cost].sum() 
-omega3c_resell = round(sum_resell_omega3c, 2) 
- 
- 
-# RedSun - VOXBONE - Cost 
-column_cost = 'Cost' 
-redsun_vox[column_cost] = pandas.to_numeric(redsun_vox[column_cost], errors='coerce') 
-sum_cost_redsun_vox = redsun_vox[column_cost].sum() 
-redsun_vox_cost = round(sum_cost_redsun_vox, 2) 
- 
-# RedSun - VOXBONE - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_redsun_vox = redsun_vox[column_cost].sum() 
-redsun_vox_resell = round(sum_resell_redsun_vox, 2) 
- 
-# RedSun - IRIDEOS - Cost 
-column_cost = 'Revenue' 
-redsun_iri[column_cost] = pandas.to_numeric(redsun_iri[column_cost], errors='coerce') 
-sum_cost_redsun_iri = redsun_iri[column_cost].sum() 
-redsun_iri_cost = round(sum_cost_redsun_iri, 2) 
- 
-# RedSun - IRIDEOS - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_redsun_iri = redsun_iri[column_cost].sum() 
-redsun_iri_resell = round(sum_resell_redsun_iri, 2) 
- 
- 
-# S2C - Cost 
-column_cost = 'Revenue' 
-s2c_iri[column_cost] = pandas.to_numeric(s2c_iri[column_cost], errors='coerce') 
-sum_cost_s2c_iri = s2c_iri[column_cost].sum() 
-s2c_iri_cost = round(sum_cost_s2c_iri, 2) 
- 
-# S2C - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_s2c_iri = s2c_iri[column_cost].sum() 
-s2c_iri_resell = round(sum_resell_s2c_iri, 2) 
- 
- 
-# ServiceCredit - Cost 
-column_cost = 'Revenue' 
-servicecredit[column_cost] = pandas.to_numeric(servicecredit[column_cost], errors='coerce') 
-sum_cost_servicecredit = servicecredit[column_cost].sum() 
-servicecredit_cost = round(sum_cost_servicecredit, 2) 
- 
-# ServiceCredit - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_servicecredit = servicecredit[column_cost].sum() 
-servicecredit_resell = round(sum_resell_servicecredit, 2) 
- 
- 
-# Venistar - IRIDEOS - Cost 
-column_cost = 'Revenue' 
-venistar_iri[column_cost] = pandas.to_numeric(venistar_iri[column_cost], errors='coerce') 
-sum_cost_venista_iri = venistar_iri[column_cost].sum() 
-venistar_iri_cost = round(sum_cost_venista_iri, 2) 
- 
-# Venistar - IRIDEOS - Reselling 
-column_cost = 'Minute/Cost' 
-sum_resell_venistar_iri = venistar_iri[column_cost].sum() 
-venistar_iri_resell = round(sum_resell_venistar_iri, 2) 
- 
- 
-# MINUTES 
- 
-# Prysmian IB 
- 
-column_cost = 'Cost' 
-prysmian_ib[column_cost] = pandas.to_numeric(prysmian_ib[column_cost], errors='coerce') 
-sum_cost_prysmian_ib = prysmian_ib[column_cost].sum() 
-cost_pry_ib = round(sum_cost_prysmian_ib, 2) 
- 
-column_minutes = 'Duration' 
-prysmian_ib[column_cost] = pandas.to_numeric(prysmian_ib[column_minutes], errors='coerce') 
-seconds_pry_ib = prysmian_ib[column_cost].sum() 
-minutes_pry_ib = seconds_pry_ib / 60 
-sum_minutes_pry_ib = round(minutes_pry_ib) 
- 
- 
-# Prysmian UK 
- 
-column_cost = 'Cost' 
-prysmian_uk[column_cost] = pandas.to_numeric(prysmian_uk[column_cost], errors='coerce') 
-sum_cost_prysmian_uk = prysmian_uk[column_cost].sum() 
-cost_pry_uk = round(sum_cost_prysmian_uk, 2) 
- 
- 
-column_minutes = 'Duration' 
-prysmian_uk[column_cost] = pandas.to_numeric(prysmian_uk[column_minutes], errors='coerce') 
-seconds_pry_uk = prysmian_uk[column_cost].sum() 
-minutes_pry_uk = seconds_pry_uk / 60 
-sum_minutes_pry_uk = round(minutes_pry_uk) 
- 
- 
-# CLEARING THE DURATION != 0 FOR THE CDR ONLY 
- 
-e80_vox = e80_vox.loc[(e80_vox['Duration'] != "0")] 
-fives_vox = fives_vox.loc[(fives_vox['Duration'] != "0")] 
-ocme_vox = ocme_vox.loc[(ocme_vox['Duration'] != "0")] 
-redsun_vox = redsun_vox.loc[(redsun_vox['Duration'] != "0")] 
- 
- 
-# Creating CDR for customers 
-cdr_columns = ['Start', 'Duration', 'From', 'To', 'Service Plan Name', 'Minute/Cost'] 
-cdr_columns_redsun = ['Start', 'Duration', 'Original From', 'To', 'Service Plan Name', 'Minute/Cost'] 
-e80_vox = e80_vox[cdr_columns] 
-e80_green_vox = e80_green_vox[cdr_columns] 
-fives_vox = fives_vox[cdr_columns] 
-ocme_vox = ocme_vox[cdr_columns] 
-redsun_vox = redsun_vox[cdr_columns_redsun] 
- 
-cdr_columns_green = ['Time_Stamp', 'Call_Duration', 'A_Subscriber_No', 'B_Subscriber_No', 'Destination', 'Minute/Cost'] 
-e80_green_iri = e80_green_iri[cdr_columns_green] 
-farmacie_green = farmacie_green[cdr_columns_green] 
-metanonord_green = metanonord_green[cdr_columns_green] 
-oltreta_green = oltreta_green[cdr_columns_green] 
- 
-rename_columns_green = {'Time_Stamp': 'Date/Time', 'Call_Duration': 'Duration', 'A_Subscriber_No': 'From', 'B_Subscriber_No': 'To', 'Destination': 'Service Plan', 'Minute/Cost': 'Minute/Cost'} 
-e80_green_iri = e80_green_iri.rename(columns=rename_columns_green) 
-farmacie_green = farmacie_green.rename(columns=rename_columns_green) 
-metanonord_green = metanonord_green.rename(columns=rename_columns_green) 
-oltreta_green = oltreta_green.rename(columns=rename_columns_green) 
- 
-e80_green_iri.to_csv(f"Irideos/" + f"E80 - ITA Toll-Free - {month} - {year}.csv", index=False) 
-farmacie_green.to_csv(f"Irideos/" + f"Farmacie - ITA Toll-Free - {month} - {year}.csv", index=False) 
-metanonord_green.to_csv(f"Irideos/" + f"MetanoNord - ITA Toll-Free - {month} - {year}.csv", index=False) 
-oltreta_green.to_csv(f"Irideos/" + f"Oltreta - ITA Toll-Free - {month} - {year}.csv", index=False) 
- 
-rename_columns = {'Start': 'Date/Time', 'Duration': 'Duration', 'From': 'From', 'To': 'To', 'Service Plan Name': 'Service Plan', 'Minute/Cost': 'Minute/Cost'} 
-rename_columns_redsun_vox = {'Start': 'Date/Time', 'Duration': 'Duration', 'Original From': 'From', 'To': 'To', 'Service Plan Name': 'Service Plan', 'Minute/Cost': 'Minute/Cost'} 
- 
-e80_vox = e80_vox.rename(columns=rename_columns) 
-e80_green_vox = e80_green_vox.rename(columns=rename_columns) 
-fives_vox = fives_vox.rename(columns=rename_columns) 
-ocme_vox = ocme_vox.rename(columns=rename_columns) 
-redsun_vox = redsun_vox.rename(columns=rename_columns_redsun_vox) 
- 
-# RENAMING THE CSV FILE 
-e80_vox.to_csv(f"Voxbone/" + f"E80 - USA-AUS Outbound - {month} - {year}.csv", index=False) 
-e80_green_vox.to_csv(f"Voxbone/" + f"E80 - USA-AUS Toll-Free - {month} - {year}.csv", index=False) 
-fives_vox.to_csv(f"Voxbone/" + f"Fives - FRA Outbound - {month} - {year}.csv", index=False) 
-ocme_vox.to_csv(f"Voxbone/" + f"OCME - International Outbound - {month} - {year}.csv", index=False) 
-redsun_vox.to_csv(f"Voxbone/" + f"RedSun - Cellulare Outbound - {month} - {year}.csv", index=False) 
- 
-cdr_columns = ['Time_Stamp', 'Call_Duration', 'A_Subscriber_No', 'B_Subscriber_No', 'Destination', 'Minute/Cost'] 
-alidays = alidays[cdr_columns] 
-beeasy_iri = beeasy_iri[cdr_columns] 
-beeasidata_iri = beeasidata_iri[cdr_columns] 
-careapt = careapt[cdr_columns] 
-e80_iri = e80_iri[cdr_columns] 
-farmacie = farmacie[cdr_columns] 
-fives_iri = fives_iri[cdr_columns] 
-giuffre = giuffre[cdr_columns] 
-golilla = golilla[cdr_columns] 
-lrh = lrh[cdr_columns] 
-if nci.empty == False: 
-    nci = nci[cdr_columns] 
-else: 
-    pass 
-ocme_iri = ocme_iri[cdr_columns] 
-omega3c = omega3c[cdr_columns] 
-redsun_iri = redsun_iri[cdr_columns] 
-s2c_iri = s2c_iri[cdr_columns] 
-servicecredit = servicecredit[cdr_columns] 
-venistar_iri = venistar_iri[cdr_columns] 
- 
- 
-# IRIDEOS 
-rename_columns = {'Time_Stamp': 'Date/Time', 'Call_Duration': 'Duration', 'A_Subscriber_No': 'From', 'B_Subscriber_No': 'To', 'Destination': 'Service Plan', 'Minute/Cost': 'Minute/Cost'} 
- 
-alidays = alidays.rename(columns=rename_columns) 
-beeasy_iri = beeasy_iri.rename(columns=rename_columns) 
-beeasidata_iri = beeasidata_iri.rename(columns=rename_columns) 
-careapt = careapt.rename(columns=rename_columns) 
-e80_iri = e80_iri.rename(columns=rename_columns) 
-farmacie = farmacie.rename(columns=rename_columns) 
-fives_iri = fives_iri.rename(columns=rename_columns) 
-giuffre = giuffre.rename(columns=rename_columns) 
-golilla = golilla.rename(columns=rename_columns) 
-lrh = lrh.rename(columns=rename_columns) 
-nci = nci.rename(columns=rename_columns) 
-ocme_iri = ocme_iri.rename(columns=rename_columns) 
-omega3c = omega3c.rename(columns=rename_columns) 
-redsun_iri = redsun_iri.rename(columns=rename_columns) 
-s2c_iri = s2c_iri.rename(columns=rename_columns) 
-servicecredit = servicecredit.rename(columns=rename_columns) 
-venistar_iri = venistar_iri.rename(columns=rename_columns) 
- 
-alidays.to_csv(f"Irideos/" + f"Alidays - ITA Outbound - {month} - {year}.csv", index=False) 
-beeasy_iri.to_csv(f"Irideos/" + f"Beeasy - ITA Outbound - {month} - {year}.csv", index=False) 
-beeasidata_iri.to_csv(f"Irideos/" + f"Isidata - ITA Outbound - {month} - {year}.csv", index=False) 
-careapt.to_csv(f"Irideos/" + f"Careapt - ITA Outbound - {month} - {year}.csv", index=False) 
-e80_iri.to_csv(f"Irideos/" + f"E80 - ITA Outbound - {month} - {year}.csv", index=False) 
-farmacie.to_csv(f"Irideos/" + f"Farmacie - ITA Outbound - {month} - {year}.csv", index=False) 
-fives_iri.to_csv(f"Irideos/" + f"Fives - ITA Outbound - {month} - {year}.csv", index=False) 
-giuffre.to_csv(f"Irideos/" + f"Giuffre - ITA Outbound - {month} - {year}.csv", index=False) 
-golilla.to_csv(f"Irideos/" + f"Golilla - ITA Outbound - {month} - {year}.csv", index=False) 
-lrh.to_csv(f"Irideos/" + f"Ingo-LRH - ITA Outbound - {month} - {year}.csv", index=False) 
-#nci.to_csv(f"Irideos/" + f"NCI - ITA Outbound - {month} - {year}.csv", index=False) 
-ocme_iri.to_csv(f"Irideos/" + f"OCME - ITA Outbound - {month} - {year}.csv", index=False) 
-omega3c.to_csv(f"Irideos/" + f"Omega3C - ITA Outbound - {month} - {year}.csv", index=False) 
-redsun_iri.to_csv(f"Irideos/" + f"RedSun - ITA Outbound - {month} - {year}.csv", index=False) 
-s2c_iri.to_csv(f"Irideos/" + f"S2C - ITA Outbound - {month} - {year}.csv", index=False) 
-servicecredit.to_csv(f"Irideos/" + f"ServiceCredit - ITA Outbound - {month} - {year}.csv", index=False) 
-venistar_iri.to_csv(f"Irideos/" + f"Venistar - ITA Outbound - {month} - {year}.csv", index=False) 
- 
-# Printing the Values: 
- 
-print(f"\n\n****VOXBONE****") 
-print(f"\n \n**** TOLL-FREE **** \n\n E80 \n Carrier Cost: {e80_green_vox_cost} €  \n Reselling Cost: {e80_green_resell_vox} €") 
-print(f"\n \n**** OUTBOUND ****\n \n \n E80 \n Carrier Cost: {e80_vox_cost} € \n Reselling Cost: {e80_vox_resell} € \n \n FIVES \n Carrier Cost: {fives_vox_cost} €\n Reselling Cost: {fives_vox_resell} €\n \n OCME \n Carrier Cost: {ocme_vox_cost} €\n Reselling Cost: {ocme_vox_resell} €\n \n REDSUN \n Carrier Cost: {redsun_vox_cost} €\n Reselling Cost: {redsun_vox_resell} €\n \n \n **** MINUTES **** \n \n \n PRYSMIAN IB \n Cost: {cost_pry_ib} € \n Minutes: {sum_minutes_pry_ib} \n \n PRYSMIAN UK \n Cost: {cost_pry_uk} € \n Minutes: {sum_minutes_pry_uk} \n \n \n") 
- 
-print(f"****IRIDEOS****") 
-print("\n\n**** TOLL-FREE ****") 
-print(f" \n Cost per Customers \n \n E80 \n Carrier Cost: {e80_green_cost_iri} \n Reselling Cost: {e80_green_resell_iri} \n \n Farmacie \n Carrier Cost: {farmacie_green_cost} \n Reselling Cost: {farmacie_green_resell} \n \n MetanoNord \n Carrier Cost: {metanonord_green_cost} \n Reselling Cost: {metanonord_green_resell} \n \n Oltreta \n Carrier Cost: {oltreta_green_cost} \n Reselling Cost: {oltreta_green_resell} \n \n") 
-print(f"\n\n**** OUTBOUND ****") 
-print(f"\n\n Cost per Customers \n \n ALIDAYS \n Carrier Cost: {alidays_cost} \n Reselling Cost: {alidays_resell} \n \n BEEASY \n Carrier Cost: {beeasy_cost} \n Reselling Cost: {beeasy_resell} \n \n CAREAPT \n Carrier Cost: {careapt_cost} \n Reselling Cost: {careapt_resell} \n \n E80 \n Carrier Cost: {e80_iri_cost} \n Reselling Cost: {e80_iri_resell} \n \n FARMACIE \n Carrier Cost: {farmacie_cost} \n Reselling Cost: {farmacie_resell} \n \n FIVES \n Carrier Cost: {fives_iri_cost} \n Reselling Cost: {fives_iri_resell} \n \n GIUFFRE \n Carrier Cost: {giuffre_cost} \n Reselling Cost: {giuffre_resell} \n \n GOLILLA \n Carrier Cost: {golilla_cost} \n Reselling Cost: {golilla_resell} \n \n ISIDATA \n Carrier Cost: {beeasidata_cost} \n Reselling Cost: {beeasidata_resell} \n \n LRH \n Carrier Cost: {lrh_cost} \n Reselling Cost: {lrh_resell} \n \n NCI \n Carrier Cost: 0 \n Reselling Cost: 0 \n \n OCME \n Carrier Cost: {ocme_iri_cost} \n Reselling Cost: {ocme_iri_resell} \n \n OMEGA3C \n Carrier Cost: {omega3c_cost} \n Reselling Cost: {omega3c_resell} \n \n REDSUN \n Carrier Cost: {redsun_iri_cost} \n Reselling Cost: {redsun_iri_resell} \n \n S2C \n Carrier Cost: {s2c_iri_cost} \n Reselling Cost: {s2c_iri_resell} \n \n SERVICECREDIT \n Carrier Cost: {servicecredit_cost} \n Reselling Cost: {servicecredit_resell} \n \n VENISTAR \n Carrier Cost: {venistar_iri_cost} \n Reselling Cost: {venistar_iri_resell} \n \n \n \n") 
- 
-exit 
-</code> 
  
cdrs/index.1728391477.txt.gz · Last modified: by antonio.andriychuk

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki