incidentsdq.py
def create_summary(self, data_frame):
        """
        This method will take the data_frame parameter, turn it into a pivot table using pandas'
        .pivot_table method and add a new Error Rate column

        :data_frame: the errors data_frame
        :return: Will return a pivot table using data from the data_fram parameter
        """
        staff_pivot = pd.pivot_table(
            data_frame,
            index=["Dept", "Name"],
            values=["Client Uid", "Errors"],
            aggfunc={"Client Uid": len, "Errors": np.sum}
        )
        staff_pivot["Error Rate"] = staff_pivot["Errors"] / (staff_pivot["Client Uid"] * 7)

        dept_pivot = pd.pivot_table(
            data_frame,
            index=["Dept"],
            values=["Client Uid", "Errors"],
            aggfunc={"Client Uid": len, "Errors": np.sum}
        )
        dept_pivot["Error Rate"] = dept_pivot["Errors"] / (dept_pivot["Client Uid"] * 7)
        return staff_pivot, dept_pivot

        This method will take the data_frame parameter, turn it into a pivot table using pandas'
        .pivot_table method and add a new Error Rate column

        :data_frame: the errors data_frame
        :return: Will return a pivot table using data from the data_fram parameter
        
This method will take the data_frame parameter, turn it into a pivot table using pandas'
.pivot_table method and add a new Error Rate column
This method will take the data_frame parameter turn it into a pivot table using pandas ' . pivot_table method and add a new Error Rate column
def create_summary(self, data_frame):
        staff_pivot = pd.pivot_table(
            data_frame,
            index=["Dept", "Name"],
            values=["Client Uid", "Errors"],
            aggfunc={"Client Uid": len, "Errors": np.sum}
        )
        staff_pivot["Error Rate"] = staff_pivot["Errors"] / (staff_pivot["Client Uid"] * 7)
        dept_pivot = pd.pivot_table(
            data_frame,
            index=["Dept"],
            values=["Client Uid", "Errors"],
            aggfunc={"Client Uid": len, "Errors": np.sum}
        )
        dept_pivot["Error Rate"] = dept_pivot["Errors"] / (dept_pivot["Client Uid"] * 7)
        return staff_pivot, dept_pivot
def create_summary ( self , data_frame ) : staff_pivot = pd . pivot_table ( data_frame , index = [ "Dept" , "Name" ] , values = [ "Client Uid" , "Errors" ] , aggfunc = { "Client Uid" : len , "Errors" : np . sum } ) staff_pivot [ "Error Rate" ] = staff_pivot [ "Errors" ] / ( staff_pivot [ "Client Uid" ] * 7 ) dept_pivot = pd . pivot_table ( data_frame , index = [ "Dept" ] , values = [ "Client Uid" , "Errors" ] , aggfunc = { "Client Uid" : len , "Errors" : np . sum } ) dept_pivot [ "Error Rate" ] = dept_pivot [ "Errors" ] / ( dept_pivot [ "Client Uid" ] * 7 ) return staff_pivot , dept_pivot
This method will take the data_frame parameter, turn it into a pivot table using pandas'
.pivot_table method and add a new Error Rate column
This method will take the data_frame parameter turn it into a pivot table using pandas ' . pivot_table method and add a new Error Rate column
"""
        This method will take the data_frame parameter, turn it into a pivot table using pandas'
        .pivot_table method and add a new Error Rate column

        :data_frame: the errors data_frame
        :return: Will return a pivot table using data from the data_fram parameter
        """
Will return a pivot table using data from the data_fram parameter
Will return a pivot table using data from the data_fram parameter
self
data_frame
data_frame
the errors data_frame
the errors data_frame