Project 1 Program and Analysis

Posted 阿难的机器学习计划

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Project 1 Program and Analysis相关的知识,希望对你有一定的参考价值。

 

  recent_grads["ShareMen"] = recent_grads["Men"]/recent_grads["Total"] # Create a new column named "ShareMen" , the value is column ‘Men‘ dedide "Total"
 

  Arts_column = pd.DataFrame(recent_grads[recent_grads["Major_category"]=="Arts"]) # Create a new DataFrame named Art_column, and the value is all the data with the Major named "Arts"

  Arts_fig = plt.figure(figsize=(8,8)) # Create a figure with 8*8 inch

  Arts_plot = Arts_fig.add_subplot(1,1,1) # Create a plot

  locs = np.arange(len(Arts_column["Major"])) #Return evenly spaced values within a given interval, the interval is the length of Arts_column["Major"]

  offset_locs = locs + 0.35 

  Arts_plot.set_xticks(offset_locs) 

  Arts_plot.set_xticklabels(Arts_column["Major"].tolist(),rotation = 90)

  bar_1 = Arts_plot.bar(locs,Arts_column["ShareMen"].tolist(),0.35) #plot.bar(Bar location, Bar value, bar width)

  bar_2 = Arts_plot.bar(offset_locs,Arts_column["ShareWomen"].tolist(),0.35,color = "green")

  plt.legend((bar_1,bar_2),("ShareMen","ShareWomen"),loc = "upper left")

  Arts_plot.grid(b="on",which = "major",axis = "both")

以上是关于Project 1 Program and Analysis的主要内容,如果未能解决你的问题,请参考以下文章

project和plan program啥区别`

Lab 1: Write a java program for the triangle problem and test the program with Junit.

Error running ‘go build myfir_go_project‘: Cannot run program

Error running ‘go build myfir_go_project‘: Cannot run program

Program, Process and Thread

[20160704]Addition program that use JOptionPane for input and output