May 22, 2017 -- SienaSemanticsSurvey -- Code Breakdown -- Cell #2

importing in python packages for future use and renaming with a shorter variable

  • matplotlib.pyplot --> plt
    • keeps track of current figure & plotting area
    • example code:

import matplotlib.pyplot as plt
plt.plot([1,2,3,4], [1,4,9,16], 'ro')
plt.axis([0, 6, 0, 20])
plt.show()

  • pandas --> pd
    • used for ease with labeled data analysis
  • numpy --> np
    • N-dimensional array object
  • collections --> coll
    • lists
    • dictionaries
    • *Indices are integers that start from zero
  • stats
    • allows access to:
      • mean()
      • median()
      • mode()
      • stdev()       (standard deviation)
      • variance()

DataFrame:
csv --> saving the excel spreadsheet as csv makes it comma separated data in rows/columns rather than tabled.
Semantics14/15/16/17 based on year of data
Use pandas package for opening the data
Pulls in four different excel data reports from '14,'15,'16,'17 that are saved under those titles in folder

shape provides dimensions of data

Comments

Popular posts from this blog

6/14/17 Notes

6/06/17 Notes (formatting code and searching for a specific person)

May 22, 2017 -- SienaSemanticsSurvey -- Code Breakdown -- Cell #8