old_contents: # -*- coding: utf-8 -*-
  
  """
  Excelt@C(.xls)csv`ɕϊēǂݍ݁AUz}EqXgO쐬A
  ܂͉A͂s߂̃vO
  f[^^DataFrameA܂SeriesɂȂ
  """
  
  import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  
  # csvt@CDataFrame^ɓǂݍ݁AindexύX
  course_after_hischool = pd.read_csv('H22_univ.csv')
  A = course_after_hischool
  prefectures = A.pop('prefecture')
  A.index = prefectures
  
  #VSeries쐬Aǉ
  B = A['to_univ']
  C = A['to_college']
  D = B + C
  A['learn'] = D
  
  operations = 'hist'
  
  #ёւAqXgO̍쐬
  if operations == 'hist':
      B = A.sort_index(by = 'learn', ascending = False)
      B['learn'].plot()
      plt.show()
  
  #Uz}̍쐬
  if operations == 'plot':
      pd.tools.plotting.scatter_plot(A, 'learn', 'univ_per_mill', color='green')
      plt.show()
  
  #A͂s
  if operations == 'regress':
      regression = pd.ols(y=A['learn'], x=A['univ_per_mill'], intercept = True)
      print(regression)
new_contents: # -*- coding: utf-8 -*-
  
  %matplotlib inline
  
  import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  
  """
  Excelt@C(.xls)csv`ɕϊēǂݍ݁AUz}EqXgO쐬A
  ܂͉A͂s߂̃vO
  f[^^DataFrameA܂SeriesɂȂ
  """
  
  # csvt@CDataFrame^ɓǂݍ݁AindexύX
  course_after_hischool = pd.read_csv('H22_univ.csv')
  A = course_after_hischool
  prefectures = A.pop('prefecture')
  A.index = prefectures
  
  #VSeries쐬Aǉ
  B = A['to_univ']
  C = A['to_college']
  D = B + C
  A['learn'] = D
  
  
  operations = 'bar'
  
  #ёւA_Ot̍쐬
  if operations == 'bar':
      B = A.sort_index(by = 'learn', ascending = False)
      B['to_univ'].plot(kind = 'bar')
      plt.show()
  
  #Uz}̍쐬
  if operations == 'plot':
      pd.tools.plotting.scatter_plot(A, 'learn', 'upm', color='green')
      plt.show()
  
  #A͂s
  if operations == 'regress':
      vals = ['upm', 'bcdum', 'dsmf', 'rowo', 'phi']
      regression = pd.ols(y=A['learn'], x=A[vals], intercept = True)
      print(regression)
subject: update pandas_read