import pandas as pd a=pd.read_csv('sales.csv') a['R_Quartile']=pd.qcut(a['recency'],[0,0.25,0.5,0.75,1],['4','3','2','1']).astype('str') a['F_Quartile']=pd.qcut(a['frequency'],[0,0.25,0.5,0.75,1],['1','2','3','4']).astype('str') a['M_Quartile']=pd.qcut(a['monetary'],[0,0.25,0.5,0.75,1],['1','2','3',...