作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我可以使用 SPSS 软件轻松绘制下面的箱线图。但是使用 Python 对我来说有点困难。
我一直在尝试进行子图,但我越来越困惑如何做到这一点。
这是来自 SPSS 的箱线图。
我想知道如何绘制类似于 seaborn 或 matplotlib 的内容?
唯一值是:
公司: TAM, GOL
目的地:SSA、SLZ、FOR、MCZ、NAT、JPA、REC
工作日:周一、周五、周六、周四、周二、周三
以下是我的数据示例。
我很感激任何答案。
,COMPANY,WEEKDAY,COST,DESTINATION
0,TAM,Monday,183.59,SSA
1,TAM,Monday,183.59,SSA
2,TAM,Monday,183.59,SSA
3,TAM,Monday,183.59,SSA
4,TAM,Monday,183.59,SSA
5,TAM,Monday,183.59,SSA
6,TAM,Monday,183.59,SSA
7,TAM,Friday,183.59,SSA
8,TAM,Friday,183.59,SSA
9,TAM,Friday,183.59,SSA
10,TAM,Friday,183.59,SSA
11,TAM,Friday,183.59,SSA
12,TAM,Friday,183.59,SSA
13,TAM,Friday,183.59,SSA
14,TAM,Saturday,170.59,SSA
15,TAM,Saturday,170.59,SSA
16,TAM,Saturday,170.59,SSA
17,TAM,Saturday,170.59,SSA
18,TAM,Saturday,170.59,SSA
19,TAM,Saturday,170.59,SSA
20,TAM,Saturday,170.59,SSA
21,TAM,Thursday,183.59,SSA
22,TAM,Thursday,183.59,SSA
23,TAM,Thursday,183.59,SSA
24,TAM,Thursday,183.59,SSA
25,TAM,Thursday,183.59,SSA
26,TAM,Thursday,183.59,SSA
27,TAM,Thursday,183.59,SSA
28,TAM,Tuesday,183.59,SSA
29,TAM,Tuesday,183.59,SSA
30,TAM,Tuesday,183.59,SSA
31,TAM,Tuesday,183.59,SSA
32,TAM,Tuesday,183.59,SSA
33,TAM,Tuesday,183.59,SSA
34,TAM,Tuesday,183.59,SSA
35,TAM,Wednesday,183.59,SSA
36,TAM,Wednesday,183.59,SSA
37,TAM,Wednesday,183.59,SSA
38,TAM,Wednesday,183.59,SSA
39,TAM,Wednesday,183.59,SSA
40,TAM,Wednesday,183.59,SSA
41,TAM,Wednesday,183.59,SSA
42,TAM,Sunday,193.59,SSA
43,TAM,Sunday,193.59,SSA
44,TAM,Sunday,193.59,SSA
45,TAM,Sunday,193.59,SSA
46,TAM,Sunday,193.59,SSA
47,TAM,Sunday,193.59,SSA
48,TAM,Sunday,193.59,SSA
49,TAM,Friday,345.69,SLZ
50,TAM,Friday,345.69,SLZ
51,TAM,Friday,345.69,SLZ
52,TAM,Friday,345.69,SLZ
53,TAM,Friday,345.69,SLZ
54,TAM,Friday,345.69,SLZ
55,TAM,Friday,345.69,SLZ
56,TAM,Monday,281.59,FOR
57,TAM,Monday,281.59,FOR
58,TAM,Monday,281.59,FOR
59,TAM,Monday,281.59,FOR
60,TAM,Monday,281.59,FOR
61,TAM,Monday,281.59,FOR
62,TAM,Monday,281.59,FOR
63,TAM,Friday,281.59,FOR
64,TAM,Friday,281.59,FOR
65,TAM,Friday,281.59,FOR
66,TAM,Friday,281.59,FOR
67,TAM,Friday,281.59,FOR
68,TAM,Friday,281.59,FOR
69,TAM,Friday,281.59,FOR
70,TAM,Saturday,359.59,FOR
71,TAM,Saturday,201.59,FOR
72,TAM,Saturday,201.59,FOR
73,TAM,Saturday,201.59,FOR
74,TAM,Saturday,201.59,FOR
75,TAM,Saturday,201.59,FOR
76,TAM,Saturday,201.59,FOR
77,TAM,Thursday,281.59,FOR
78,TAM,Thursday,281.59,FOR
79,TAM,Thursday,281.59,FOR
80,TAM,Thursday,281.59,FOR
81,TAM,Thursday,281.59,FOR
82,TAM,Thursday,281.59,FOR
83,TAM,Thursday,281.59,FOR
84,TAM,Tuesday,281.59,FOR
85,TAM,Tuesday,281.59,FOR
86,TAM,Tuesday,281.59,FOR
87,TAM,Tuesday,281.59,FOR
88,TAM,Tuesday,281.59,FOR
89,TAM,Tuesday,281.59,FOR
90,TAM,Tuesday,281.59,FOR
91,TAM,Wednesday,341.59,FOR
92,TAM,Wednesday,341.59,FOR
93,TAM,Wednesday,341.59,FOR
94,TAM,Wednesday,341.59,FOR
95,TAM,Wednesday,341.59,FOR
96,TAM,Wednesday,341.59,FOR
97,TAM,Wednesday,341.59,FOR
98,TAM,Sunday,281.59,FOR
99,TAM,Sunday,281.59,FOR
100,TAM,Sunday,281.59,FOR
101,TAM,Sunday,281.59,FOR
102,TAM,Sunday,281.59,FOR
103,TAM,Sunday,281.59,FOR
104,TAM,Sunday,281.59,FOR
105,TAM,Monday,360.69,MCZ
106,TAM,Monday,430.69,MCZ
107,TAM,Monday,430.69,MCZ
108,TAM,Monday,430.69,MCZ
109,TAM,Monday,430.69,MCZ
110,TAM,Monday,430.69,MCZ
111,TAM,Monday,430.69,MCZ
112,TAM,Friday,360.69,MCZ
113,TAM,Friday,360.69,MCZ
114,TAM,Friday,360.69,MCZ
115,TAM,Friday,360.69,MCZ
116,TAM,Friday,360.69,MCZ
117,TAM,Friday,360.69,MCZ
118,TAM,Friday,360.69,MCZ
119,TAM,Thursday,360.69,MCZ
120,TAM,Thursday,360.69,MCZ
121,TAM,Thursday,360.69,MCZ
122,TAM,Thursday,360.69,MCZ
123,TAM,Thursday,360.69,MCZ
124,TAM,Thursday,360.69,MCZ
125,TAM,Thursday,360.69,MCZ
126,TAM,Wednesday,360.69,MCZ
127,TAM,Wednesday,360.69,MCZ
128,TAM,Wednesday,360.69,MCZ
129,TAM,Wednesday,360.69,MCZ
130,TAM,Wednesday,360.69,MCZ
131,TAM,Wednesday,360.69,MCZ
132,TAM,Wednesday,360.69,MCZ
133,TAM,Sunday,360.69,MCZ
134,TAM,Sunday,360.69,MCZ
135,TAM,Sunday,360.69,MCZ
136,TAM,Sunday,360.69,MCZ
137,TAM,Sunday,360.69,MCZ
138,TAM,Sunday,360.69,MCZ
139,TAM,Sunday,360.69,MCZ
140,TAM,Monday,491.59,NAT
141,TAM,Monday,491.59,NAT
142,TAM,Monday,491.59,NAT
143,TAM,Monday,491.59,NAT
144,TAM,Monday,491.59,NAT
145,TAM,Monday,491.59,NAT
146,TAM,Monday,491.59,NAT
147,TAM,Friday,491.59,NAT
148,TAM,Friday,491.59,NAT
149,TAM,Friday,491.59,NAT
150,TAM,Friday,491.59,NAT
151,TAM,Friday,491.59,NAT
152,TAM,Friday,491.59,NAT
153,TAM,Friday,491.59,NAT
154,TAM,Thursday,491.59,NAT
155,TAM,Thursday,491.59,NAT
156,TAM,Thursday,491.59,NAT
157,TAM,Thursday,491.59,NAT
158,TAM,Thursday,491.59,NAT
159,TAM,Thursday,491.59,NAT
160,TAM,Thursday,491.59,NAT
161,TAM,Tuesday,578.59,NAT
162,TAM,Tuesday,578.59,NAT
163,TAM,Tuesday,578.59,NAT
164,TAM,Tuesday,578.59,NAT
165,TAM,Tuesday,578.59,NAT
166,TAM,Tuesday,578.59,NAT
167,TAM,Tuesday,578.59,NAT
168,TAM,Wednesday,491.59,NAT
169,TAM,Wednesday,491.59,NAT
170,TAM,Wednesday,491.59,NAT
171,TAM,Wednesday,491.59,NAT
172,TAM,Wednesday,491.59,NAT
173,TAM,Wednesday,491.59,NAT
174,TAM,Wednesday,491.59,NAT
175,TAM,Sunday,491.59,NAT
176,TAM,Sunday,491.59,NAT
177,TAM,Sunday,491.59,NAT
178,TAM,Sunday,491.59,NAT
179,TAM,Sunday,491.59,NAT
180,TAM,Sunday,491.59,NAT
181,TAM,Sunday,491.59,NAT
182,TAM,Monday,330.69,JPA
183,TAM,Monday,330.69,JPA
184,TAM,Monday,330.69,JPA
185,TAM,Monday,330.69,JPA
186,TAM,Monday,330.69,JPA
187,TAM,Monday,330.69,JPA
188,TAM,Monday,330.69,JPA
189,TAM,Thursday,330.69,JPA
190,TAM,Thursday,330.69,JPA
191,TAM,Thursday,330.69,JPA
192,TAM,Thursday,330.69,JPA
193,TAM,Thursday,330.69,JPA
194,TAM,Thursday,330.69,JPA
195,TAM,Thursday,330.69,JPA
196,TAM,Sunday,330.69,JPA
197,TAM,Sunday,330.69,JPA
198,TAM,Sunday,330.69,JPA
199,TAM,Sunday,330.69,JPA
200,TAM,Sunday,330.69,JPA
201,TAM,Sunday,330.69,JPA
202,TAM,Sunday,330.69,JPA
203,TAM,Monday,325.69,REC
204,TAM,Monday,327.49,REC
205,TAM,Monday,327.49,REC
206,TAM,Monday,327.49,REC
207,TAM,Monday,327.49,REC
208,TAM,Monday,327.49,REC
209,TAM,Monday,327.49,REC
210,TAM,Friday,325.69,REC
211,TAM,Friday,327.49,REC
212,TAM,Friday,327.49,REC
213,TAM,Friday,327.49,REC
214,TAM,Friday,327.49,REC
215,TAM,Friday,327.49,REC
216,TAM,Friday,327.49,REC
217,TAM,Saturday,338.69,REC
218,TAM,Saturday,338.69,REC
219,TAM,Saturday,338.69,REC
220,TAM,Saturday,338.69,REC
221,TAM,Saturday,338.69,REC
222,TAM,Saturday,338.69,REC
223,TAM,Saturday,440.69,REC
224,TAM,Thursday,739.69,REC
225,TAM,Thursday,739.69,REC
226,TAM,Thursday,739.69,REC
227,TAM,Thursday,739.69,REC
228,TAM,Thursday,739.69,REC
229,TAM,Thursday,739.69,REC
230,TAM,Thursday,739.69,REC
231,TAM,Tuesday,325.69,REC
232,TAM,Tuesday,327.49,REC
233,TAM,Tuesday,327.49,REC
234,TAM,Tuesday,327.49,REC
235,TAM,Tuesday,327.49,REC
236,TAM,Tuesday,327.49,REC
237,TAM,Tuesday,327.49,REC
238,TAM,Wednesday,440.69,REC
239,TAM,Wednesday,327.49,REC
240,TAM,Wednesday,327.49,REC
241,TAM,Wednesday,327.49,REC
242,TAM,Wednesday,327.49,REC
243,TAM,Wednesday,327.49,REC
244,TAM,Wednesday,440.69,REC
245,TAM,Sunday,325.69,REC
246,TAM,Sunday,327.49,REC
247,TAM,Sunday,327.49,REC
248,TAM,Sunday,327.49,REC
249,TAM,Sunday,327.49,REC
250,TAM,Sunday,327.49,REC
251,TAM,Sunday,327.49,REC
252,GOL,Monday,208.59,SSA
253,GOL,Monday,208.59,SSA
254,GOL,Monday,208.59,SSA
255,GOL,Monday,208.59,SSA
256,GOL,Monday,208.59,SSA
257,GOL,Monday,208.59,SSA
258,GOL,Monday,208.59,SSA
259,GOL,Friday,208.59,SSA
260,GOL,Friday,208.59,SSA
261,GOL,Friday,208.59,SSA
262,GOL,Friday,208.59,SSA
263,GOL,Friday,208.59,SSA
264,GOL,Friday,208.59,SSA
265,GOL,Friday,208.59,SSA
266,GOL,Saturday,208.59,SSA
267,GOL,Saturday,208.59,SSA
268,GOL,Saturday,208.59,SSA
269,GOL,Saturday,208.59,SSA
270,GOL,Saturday,208.59,SSA
271,GOL,Saturday,208.59,SSA
272,GOL,Saturday,208.59,SSA
273,GOL,Thursday,208.59,SSA
274,GOL,Thursday,208.59,SSA
275,GOL,Thursday,208.59,SSA
276,GOL,Thursday,208.59,SSA
277,GOL,Thursday,208.59,SSA
278,GOL,Thursday,208.59,SSA
279,GOL,Thursday,208.59,SSA
280,GOL,Tuesday,208.59,SSA
281,GOL,Tuesday,208.59,SSA
282,GOL,Tuesday,208.59,SSA
283,GOL,Tuesday,208.59,SSA
284,GOL,Tuesday,208.59,SSA
285,GOL,Tuesday,208.59,SSA
286,GOL,Tuesday,208.59,SSA
287,GOL,Wednesday,208.59,SSA
288,GOL,Wednesday,250.59,SSA
289,GOL,Wednesday,250.59,SSA
290,GOL,Wednesday,250.59,SSA
291,GOL,Wednesday,250.59,SSA
292,GOL,Wednesday,250.59,SSA
293,GOL,Wednesday,250.59,SSA
294,GOL,Sunday,208.59,SSA
295,GOL,Sunday,208.59,SSA
296,GOL,Sunday,208.59,SSA
297,GOL,Sunday,208.59,SSA
298,GOL,Sunday,208.59,SSA
299,GOL,Sunday,208.59,SSA
300,GOL,Sunday,930.69,SSA
301,GOL,Friday,345.69,SLZ
302,GOL,Friday,345.69,SLZ
303,GOL,Friday,345.69,SLZ
304,GOL,Friday,345.69,SLZ
305,GOL,Friday,345.69,SLZ
306,GOL,Friday,345.69,SLZ
307,GOL,Friday,345.69,SLZ
308,GOL,Thursday,345.69,SLZ
309,GOL,Thursday,345.69,SLZ
310,GOL,Thursday,345.69,SLZ
311,GOL,Thursday,345.69,SLZ
312,GOL,Thursday,345.69,SLZ
313,GOL,Thursday,345.69,SLZ
314,GOL,Thursday,345.69,SLZ
315,GOL,Tuesday,345.69,SLZ
316,GOL,Tuesday,345.69,SLZ
317,GOL,Tuesday,345.69,SLZ
318,GOL,Tuesday,345.69,SLZ
319,GOL,Tuesday,345.69,SLZ
320,GOL,Tuesday,345.69,SLZ
321,GOL,Tuesday,345.69,SLZ
322,GOL,Sunday,345.69,SLZ
323,GOL,Sunday,345.69,SLZ
324,GOL,Sunday,345.69,SLZ
325,GOL,Sunday,345.69,SLZ
326,GOL,Sunday,345.69,SLZ
327,GOL,Sunday,345.69,SLZ
328,GOL,Sunday,345.69,SLZ
329,GOL,Monday,341.59,FOR
330,GOL,Monday,341.59,FOR
331,GOL,Monday,341.59,FOR
332,GOL,Monday,341.59,FOR
333,GOL,Monday,341.59,FOR
334,GOL,Monday,341.59,FOR
335,GOL,Monday,341.59,FOR
336,GOL,Friday,433.59,FOR
337,GOL,Friday,433.59,FOR
338,GOL,Friday,433.59,FOR
339,GOL,Friday,433.59,FOR
340,GOL,Friday,433.59,FOR
341,GOL,Friday,433.59,FOR
342,GOL,Friday,757.59,FOR
343,GOL,Thursday,341.59,FOR
344,GOL,Thursday,341.59,FOR
345,GOL,Thursday,341.59,FOR
346,GOL,Thursday,341.59,FOR
347,GOL,Thursday,341.59,FOR
348,GOL,Thursday,341.59,FOR
349,GOL,Thursday,341.59,FOR
350,GOL,Tuesday,341.59,FOR
351,GOL,Tuesday,341.59,FOR
352,GOL,Tuesday,341.59,FOR
353,GOL,Tuesday,341.59,FOR
354,GOL,Tuesday,341.59,FOR
355,GOL,Tuesday,341.59,FOR
356,GOL,Tuesday,341.59,FOR
357,GOL,Wednesday,341.59,FOR
358,GOL,Wednesday,422.59,FOR
359,GOL,Wednesday,422.59,FOR
360,GOL,Wednesday,422.59,FOR
361,GOL,Wednesday,422.59,FOR
362,GOL,Wednesday,422.59,FOR
363,GOL,Wednesday,422.59,FOR
364,GOL,Sunday,433.59,FOR
365,GOL,Sunday,433.59,FOR
366,GOL,Sunday,433.59,FOR
367,GOL,Sunday,433.59,FOR
368,GOL,Sunday,433.59,FOR
369,GOL,Sunday,433.59,FOR
370,GOL,Sunday,433.59,FOR
371,GOL,Monday,360.69,MCZ
372,GOL,Monday,360.69,MCZ
373,GOL,Monday,360.69,MCZ
374,GOL,Monday,360.69,MCZ
375,GOL,Monday,360.69,MCZ
376,GOL,Monday,360.69,MCZ
377,GOL,Monday,360.69,MCZ
378,GOL,Thursday,360.69,MCZ
379,GOL,Thursday,360.69,MCZ
380,GOL,Thursday,930.69,MCZ
381,GOL,Thursday,930.69,MCZ
382,GOL,Thursday,930.69,MCZ
383,GOL,Thursday,930.69,MCZ
384,GOL,Thursday,360.69,MCZ
385,GOL,Tuesday,360.69,MCZ
386,GOL,Tuesday,360.69,MCZ
387,GOL,Tuesday,360.69,MCZ
388,GOL,Tuesday,360.69,MCZ
389,GOL,Tuesday,360.69,MCZ
390,GOL,Tuesday,360.69,MCZ
391,GOL,Tuesday,360.69,MCZ
392,GOL,Wednesday,360.69,MCZ
393,GOL,Wednesday,360.69,MCZ
394,GOL,Wednesday,930.69,MCZ
395,GOL,Wednesday,930.69,MCZ
396,GOL,Wednesday,470.69,MCZ
397,GOL,Wednesday,470.69,MCZ
398,GOL,Wednesday,470.69,MCZ
399,GOL,Sunday,360.69,MCZ
400,GOL,Sunday,360.69,MCZ
401,GOL,Sunday,360.69,MCZ
402,GOL,Sunday,360.69,MCZ
403,GOL,Sunday,360.69,MCZ
404,GOL,Sunday,360.69,MCZ
405,GOL,Sunday,360.69,MCZ
406,GOL,Monday,491.59,NAT
407,GOL,Monday,491.59,NAT
408,GOL,Monday,491.59,NAT
409,GOL,Monday,491.59,NAT
410,GOL,Monday,491.59,NAT
411,GOL,Monday,491.59,NAT
412,GOL,Monday,491.59,NAT
413,GOL,Friday,491.59,NAT
414,GOL,Friday,491.59,NAT
415,GOL,Friday,491.59,NAT
416,GOL,Friday,491.59,NAT
417,GOL,Friday,491.59,NAT
418,GOL,Friday,491.59,NAT
419,GOL,Friday,491.59,NAT
420,GOL,Thursday,491.59,NAT
421,GOL,Thursday,491.59,NAT
422,GOL,Thursday,491.59,NAT
423,GOL,Thursday,491.59,NAT
424,GOL,Thursday,491.59,NAT
425,GOL,Thursday,491.59,NAT
426,GOL,Thursday,491.59,NAT
427,GOL,Tuesday,491.59,NAT
428,GOL,Tuesday,491.59,NAT
429,GOL,Tuesday,491.59,NAT
430,GOL,Tuesday,491.59,NAT
431,GOL,Tuesday,491.59,NAT
432,GOL,Tuesday,491.59,NAT
433,GOL,Tuesday,491.59,NAT
434,GOL,Wednesday,491.59,NAT
435,GOL,Wednesday,743.59,NAT
436,GOL,Wednesday,743.59,NAT
437,GOL,Wednesday,743.59,NAT
438,GOL,Wednesday,743.59,NAT
439,GOL,Wednesday,850.59,NAT
440,GOL,Wednesday,743.59,NAT
441,GOL,Sunday,491.59,NAT
442,GOL,Sunday,491.59,NAT
443,GOL,Sunday,491.59,NAT
444,GOL,Sunday,491.59,NAT
445,GOL,Sunday,491.59,NAT
446,GOL,Sunday,491.59,NAT
447,GOL,Sunday,491.59,NAT
448,GOL,Monday,330.69,JPA
449,GOL,Monday,330.69,JPA
450,GOL,Monday,330.69,JPA
451,GOL,Monday,330.69,JPA
452,GOL,Monday,330.69,JPA
453,GOL,Monday,330.69,JPA
454,GOL,Monday,930.69,JPA
455,GOL,Saturday,330.69,JPA
456,GOL,Saturday,330.69,JPA
457,GOL,Saturday,330.69,JPA
458,GOL,Saturday,330.69,JPA
459,GOL,Saturday,330.69,JPA
460,GOL,Saturday,330.69,JPA
461,GOL,Saturday,330.69,JPA
462,GOL,Thursday,330.69,JPA
463,GOL,Thursday,330.69,JPA
464,GOL,Thursday,330.69,JPA
465,GOL,Thursday,330.69,JPA
466,GOL,Thursday,330.69,JPA
467,GOL,Thursday,330.69,JPA
468,GOL,Thursday,330.69,JPA
469,GOL,Tuesday,330.69,JPA
470,GOL,Tuesday,330.69,JPA
471,GOL,Tuesday,330.69,JPA
472,GOL,Tuesday,330.69,JPA
473,GOL,Tuesday,330.69,JPA
474,GOL,Tuesday,330.69,JPA
475,GOL,Tuesday,330.69,JPA
476,GOL,Wednesday,330.69,JPA
477,GOL,Wednesday,330.69,JPA
478,GOL,Wednesday,330.69,JPA
479,GOL,Wednesday,330.69,JPA
480,GOL,Wednesday,330.69,JPA
481,GOL,Wednesday,330.69,JPA
482,GOL,Wednesday,930.69,JPA
483,GOL,Sunday,330.69,JPA
484,GOL,Sunday,330.69,JPA
485,GOL,Sunday,330.69,JPA
486,GOL,Sunday,330.69,JPA
487,GOL,Sunday,330.69,JPA
488,GOL,Sunday,330.69,JPA
489,GOL,Sunday,330.69,JPA
490,GOL,Monday,324.69,REC
491,GOL,Monday,324.69,REC
492,GOL,Monday,324.69,REC
493,GOL,Monday,324.69,REC
494,GOL,Monday,324.69,REC
495,GOL,Monday,324.69,REC
496,GOL,Monday,930.69,REC
497,GOL,Friday,324.69,REC
498,GOL,Friday,324.69,REC
499,GOL,Friday,324.69,REC
500,GOL,Friday,324.69,REC
501,GOL,Friday,324.69,REC
502,GOL,Friday,324.69,REC
503,GOL,Friday,324.69,REC
504,GOL,Saturday,324.69,REC
505,GOL,Saturday,324.69,REC
506,GOL,Saturday,324.69,REC
507,GOL,Saturday,324.69,REC
508,GOL,Saturday,324.69,REC
509,GOL,Saturday,324.69,REC
510,GOL,Saturday,324.69,REC
511,GOL,Thursday,324.69,REC
512,GOL,Thursday,324.69,REC
513,GOL,Thursday,324.69,REC
514,GOL,Thursday,324.69,REC
515,GOL,Thursday,324.69,REC
516,GOL,Thursday,324.69,REC
517,GOL,Thursday,930.69,REC
518,GOL,Tuesday,324.69,REC
519,GOL,Tuesday,324.69,REC
520,GOL,Tuesday,324.69,REC
521,GOL,Tuesday,324.69,REC
522,GOL,Tuesday,324.69,REC
523,GOL,Tuesday,324.69,REC
524,GOL,Tuesday,324.69,REC
525,GOL,Wednesday,324.69,REC
526,GOL,Wednesday,380.69,REC
527,GOL,Wednesday,380.69,REC
528,GOL,Wednesday,380.69,REC
529,GOL,Wednesday,380.69,REC
530,GOL,Wednesday,930.69,REC
531,GOL,Wednesday,930.69,REC
532,GOL,Sunday,324.69,REC
533,GOL,Sunday,324.69,REC
534,GOL,Sunday,324.69,REC
535,GOL,Sunday,324.69,REC
536,GOL,Sunday,324.69,REC
537,GOL,Sunday,324.69,REC
538,GOL,Sunday,324.69,REC
最佳答案
制图 seaborn.boxplot
至 seaborn.Facetgrid
:
Facetgrid
是用于绘制条件关系的多图网格。 WEEKDAY
标题可以放在右边距,用FacetGrid
参数,margin_titles=True
,但这也需要更多的垂直空间。 import pandas as pd
import calendar
import seaborn as sns
# given your data in dataframe df, read from a csv
df = pd.read_csv('test.csv', index_col=0)
# create the FacetGrid with boxplot
g = sns.FacetGrid(data=df, col='COMPANY', row='WEEKDAY', height=1.5, aspect=4, margin_titles=True, row_order=calendar.day_name)
g.map(sns.boxplot, 'DESTINATION', 'COST', order=sorted(df.DESTINATION.unique()))
g = sns.FacetGrid(data=df, col='COMPANY', row='WEEKDAY', height=1.5, aspect=4, margin_titles=True, row_order=calendar.day_name)
g.map(sns.boxplot, 'DESTINATION', 'COST', order=sorted(df.DESTINATION.unique()))
# Iterate through each axis
for ax in g.axes.flat:
# Make x and y-axis labels slightly larger
ax.set_xlabel(ax.get_xlabel(), fontsize='x-large')
ax.set_ylabel(ax.get_ylabel(), fontsize='x-large')
# Make title more human-readable and larger
if ax.get_title():
ax.set_title(ax.get_title().split('=')[1],
fontsize='xx-large')
# Make right ylabel more human-readable and larger
# Only the 2nd and 4th axes have something in ax.texts
if ax.texts:
# This contains the right ylabel text
txt = ax.texts[0]
ax.text(txt.get_unitless_position()[0], txt.get_unitless_position()[1],
txt.get_text().split('=')[1],
transform=ax.transAxes,
va='center',
fontsize='xx-large')
# Remove the original text
ax.texts[0].remove()
关于python - 如何将多分类数据框绘制为单个箱线图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64288143/
我是一名优秀的程序员,十分优秀!