I have a dataframe with repetitive data and I want to plot it (may be using seaborn). column1 has 4 different strings which repeat 6 times each. column2 has their corresponding values in decimals(float). I have to boxplot it with the 4 distinct names on the x-axis and their corresponding values on the y-axis
mydata = np.normal(What to write in this!)
sns.boxplot(data=mydata);
sns.plt.show()
Data is of the form:
col_A col_B col_C
2 CareNigr 1 593.662
11 JuncEffu 1 1739.839
27 HolcLana 23 3255.829
28 CareNigr 5 2960.367
49 JuncEffu 19 1137.202
66 HolcLana 19 3389.649
67 CareNigr 7 1478.291
68 HolcLana 13 2898.826
84 LychFlos 23 2897.199
87 LychFlos 8 3227.606
90 JuncEffu 1 937.697
98 HolcLana 14 2577.221
108 LychFlos 20 1814.692
127 CareNigr 4 1617.430
139 LychFlos 9 583.174
144 JuncEffu 17 1461.574
148 CareNigr 3 1387.861
156 HolcLana 7 2447.608
167 JuncEffu 1 1566.370
168 HolcLana 20 1759.717
175 JuncEffu 24 1845.036
179 LychFlos 1 598.637
193 LychFlos 1 2673.134
194 CareNigr 19 2037.673
您可能想尝试df.boxplot(by='col_A', column="col_C",)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.