Question: def find_dataset_statistics(dataset:pd.DataFrame,target_col:str) -> tuple[int,int,int,int,float]: # TODO: Write the necessary code to generate the following dataset statistics given a dataframe # and a target column name.

def find_dataset_statistics(dataset:pd.DataFrame,target_col:str) -> tuple[int,int,int,int,float]: # TODO: Write the necessary code to generate the following dataset statistics given a dataframe # and a target column name.

#Total number of records n_records = 0 #Total number of columns n_columns = 0 #Number of records where target is negative n_negative = 0 #Number of records where where target is positive n_positive = 0 # Percentage of instances of positive target value perc_positive = 0

return n_records,n_columns,n_negative,n_positive,perc_positive

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!