along the same lineswe use the applymap(function to perform another element-wise operation to get the week of the transaction from the date attribute for this casewe use the lambda function to get the job done quickly refer to previous for more details on lambda functions the following snippet gets us the week for each of the transactions df['purchase_week'df[['date']applymap(lambda dt:dt week if not pd isnull(dt weekelse figure - depicts our dataframe with two additional attributes--user_class and purchase_week figure - dataframe with derived attributes using map and applymap let' now use the apply(function to perform action on the whole of the dataframe object itself the following snippet uses the apply(function to get range (maximum value to minimum valuefor all numeric attributes we use the previously discussed select_dtypes and lambda function to complete the task df select_dtypes(include=[np number]apply(lambda xx max() min()the output is reduced pandas series object showcasing range values for each of the numeric columns price product_id quantity_purchased serial_no user_id purchase_week imputing missing values missing values can lead to all sorts of problems when dealing with machine learning and data science related use cases not only can they cause problems for algorithmsthey can mess up calculations and even final outcomes missing values also pose risk of being interpreted in non-standard ways as well leading to confusion and more errors henceimputing missing values carries lot of weight in the overall data wrangling process one of the easiest ways of handling missing values is to ignore or remove them altogether from the dataset when the dataset is fairly large and we have enough samples of various types requiredthis option can be safely exercised we use the dropna(function from pandas in the following snippet to remove rows of data where the date of transaction is missing print("drop rows with missing dates::df_dropped df dropna(subset=['date']print("shape::",df_dropped shape