Python経験総括-グラフィックス表示(一)
前に書く蓄積作業でよく使われるが、時間のかかるデータ処理技術. は、フラグメント化時間を用いて小記を完了する.
P 1:Pandas Series非科学計数法表示
P2: plt.title/labels引用中国語
P 3:Pandasデータスタック表示
最後に具体的なコードはGitHubに提出されました.ダウンロードする必要があります. 非科学計数法表示-中国語文字化けし-データスタック表示.ipynb
P 1:Pandas Series非科学計数法表示
pd.set_option('display.float_format', lambda x : '%.5f' % x)
data_test.sample(3)
P2: plt.title/labels引用中国語
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
plt.figure(figsize=(6,6))
labels = ' ', ' ', ' ', ' ',' '
randoms = [23,7,13,51,9]
explode = [0, 0, 0.05, 0,0.1]
patches,texts,autotexts=plt.pie(x=randoms, labels=labels, explode=explode,autopct='%3.1f %%', labeldistance=1.1, startangle = 90,pctdistance = 0.6)
plt.title(u" ",y = 1.1,fontsize = 12)
plt.show()
P 3:Pandasデータスタック表示
import matplotlib.pyplot as plt
plt.figure(figsize=(12,4))
plt.title("Series ",FontProperties=font,fontsize = 18)
plt.bar(stacked_df.index.tolist(),stacked_df.sort_index(ascending=True,axis=0).apple.tolist())
plt.bar(stacked_df.index.tolist(),stacked_df.sort_index(ascending=True,axis=0).apple.tolist(),bottom=stacked_df.sort_index(ascending=True,axis=0).apple.tolist())
plt.grid()
plt.xlabel(' ',FontProperties=font,fontsize = 12)
plt.ylabel(' ',FontProperties=font,fontsize = 12)
plt.show()
最後に