Objects most commonly used in python for data are arrays and lists. Library “numpy” (most important library/package for data science in Python) provides many usefull commands.

  • simple list: mylist1=[1,2,3,4,5]
  • list of lists: mylistoflists=[mylist1, mylist2, …]
  • array from list: myarray=numpy.array(mylist1)
  • initialize 10-items array with zeros: myzeroarray=numpy.zeros(10)
  • shape of array: myarray.shape