import pandas
import seaborn
import numpy
import matplotlib.pyplot as plt
年
国家
输出
0
2018
阿根廷
466649
1个
2018
奥地利
164900
2个
2018
比利时
308493
3个
2018
巴西
2879809
4个
2018
加拿大
2020840
# 让我们也看看尾部
data_df.tail()
年
国家
输出
835
1999
乌克兰
1918年
836
1999
英国
1973519
837
1999
美国
13024978
838
1999
乌兹别克斯坦
44433
839
1999
其他
11965
# 让我们试试 .describe()
data_df.describe()
年
输出
数数
840.000000
8.400000e+02
意思
2008.284524
1.840118e+06
标准
5.709808
3.407141e+06
分钟
1999.000000
3.600000e+01
25%
2004.000000
1.633742e+05
50%
2008.000000
5.586175e+05
75%
2013.000000
1.970880e+06
最大限度
2018.000000
2.901543e+07
plt.figure(figsize=(20,15))
plot1 = seaborn.scatterplot(x="year",y="output ",hue="country ", data=data_df)
plot1.set_title("production output by year (OICA data)", fontsize=22)
plot1.set_xlabel("year",fontsize=16)
文本(0, 0.5, '输出')
plt.figure(figsize=(20,15))
plt.xticks(rotation=90)
plot2 = seaborn.boxplot(x="country ",y="output ",data=data_df)
plot2.set_title("annual production output distribution by nation, 1999 - 2018 (OICA data)",fontsize=22)
plot2.set_xlabel("country",fontsize=16)
plot2.set_ylabel("annual production output",fontsize=16)
Text(0, 0.5, '年产量')
plt.figure(figsize=(20,15))
plt.xticks(rotation=90)
seaborn.set_style("whitegrid")
seaborn.set_context("talk")
plot3 = seaborn.swarmplot(x="country ",y="output ",data=data_df,color="green")
plot3.set_title("annual automotive industry production output by country from 1999 to 2018, according to OICA",fontsize=22)
plot3.set_xlabel("country",fontsize=22)
plt.axhline(data_df["output "].mean(),color="blue")
<matplotlib.lines.Line2D 位于 0x2b02ec39b88>
plt.figure(figsize=(20,15))
seaborn.set_context("paper")
plot4 = seaborn.lineplot(x="year",y="output ",hue="country ",data=data_df)
plot4.set_title("OICA automotive industry production output time series, 1999 - 2018",fontsize=22)
plot4.set_xlabel("year",fontsize=22)
plot4.set_ylabel("production output [units]",fontsize=22)
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Leave a Reply