pandas data analysis reading notes (5)

plt.xlabel(), draw the x-axis title

Plt.ylabel(), draw the y-axis title

Plt.savefig('figpath.png'), save the picture as a file

 

S = pd.Series(np.random.randn(10).cumsum())

  1. plot(ax =, style ='ko--', alpha, kind ='line', use_index =, xticks =, yticks =, grid = True), where ax is the subplot object to be drawn on, and style refers to the division character String, alpha refers to the transparency, kind refers to the type of line type, whether use_index uses the index of the object as the tick label, xticks is used as the value of the X-axis scale, yticks is used as the value of the Y-axis scale, and the grid displays the axis grid lines

 

S.plot.bar(ax = axes[0], color ='k', alpha = 0.7), draw a horizontal histogram

S.plot.barh(ax = axes[1], color ='k', alpha = 0.7), draw a vertical histogram

 

Df.plot.bar(stacked = False), each line has a histogram, when stacked = True, a stacked chart is generated

 

S.plot.hist(bins = 50), the histogram, divided into 50 panels in total

S.plot.density(), density plot

Sns.distplot(values, bins = 100, color ='k'), using seaborn to draw a histogram and continuous density estimate at the same time

 

Sns.regplot('m1','unemp', data = trans_data), used to draw a scatter plot, and then draw a regression line

 

Sns.parplot(), used to draw a scatter plot matrix, and then on the diagonal is the density estimate of this variable

Sns.factorplot(x = ‘tip_pct’, y = ‘day’, kind = ‘box’, data = tips[tips.tip_pct < 0.5]),画盒图

Guess you like

Origin blog.csdn.net/u012724887/article/details/107176517