I have a flat file with 31 rows and around 50k columns.
import file and group to new data frame. The code below works and results is shown:
RTE_subject = rte.groupby(by=["RTE Subject Type", "Account: External ID"]).agg({"Sent":"sum", "Opened":"sum", "Clicked":"sum"}) RTE_subject["cr"]=RTE_subject.Opened/RTE_subject.Sent RTE_subject["ctr"]=RTE_subject.Clicked/RTE_subject.Opened print(RTE_subject.head())
results of the code:
I try to build box plot using
RTE_subject
:sns.catplot(data=RTE_subject, x="RTE Subject Type", y="ctr", kind="box") plt.show()
but got this message
ValueError: Could not interpret input 'RTE Subject Type'
.