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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started