In [11]:
import numpy as np
In [12]:
import pandas as pd
In [27]:
df = pd.read_csv('calls_taken.csv', encoding='latin1', error_bad_lines=False)
In [28]:
df_cleaned = df.drop(['Unnamed: 17'], axis=1)
In [29]:
df_cleaned = df_cleaned[pd.notnull(df_cleaned['TellerKey'])]
In [31]:
df_cleaned.TotalCalls = df_cleaned.TotalCalls.apply(np.int64)
In [40]:
df_cleaned.pivot_table(index=['City', 'Team', 'Manager', 'FullName'], values=['TotalCalls', 'TotalCallsATT', 'TotalCallsACW',
                                                                             'TotalCallsAVGHoldTime', 'totalCallsAHT',
                                                                             'TotalConsults', 'TotalTransfers',
                                                                             'TotalConference']).to_csv('output.csv')