serial no non-null int user id non-null int user type non-null object dtypesfloat ( )int ( )object( memory usage kb none summary stats:price product id quantity purchased serial no user id count mean std min - - max filtering data we have completed our first pass of the dataset at hand and understood what it has and what is missing the next stage is about cleanup cleaning dataset involves tasks such as removing/handling incorrect or missing datahandling outliersand so on cleaning also involves standardizing attribute column names to make them more readableintuitiveand conforming to certain standards for everyone involved to understand to perform this taskwe write small function and utilize the rename(utility of pandas to complete this step the rename(function takes dict with keys representing the old column names while values point to newer ones we can also decide to modify the existing dataframe or generate new one by setting the inplace flag appropriately the following snippet showcases this function def cleanup_column_names(df,rename_dict={},do_inplace=true)"""this function renames columns of pandas dataframe it converts column names to snake case if rename_dict is not passed argsrename_dict (dict)keys represent old column names and values point to newer ones do_inplace (bool)flag to update existing dataframe or return new one returnspandas dataframe if do_inplace is set to falsenone otherwise ""if not rename_dictreturn df rename(columns={colcol lower(replace(',' 'for col in df columns values tolist()}inplace=do_inplaceelsereturn df rename(columns=rename_dict,inplace=do_inplaceupon using this function on our dataframe in considerationthe output in figure - is generated since we do not pass any dict with old and new column namesthe function updates all columns to snake case