Tut#15-16: Pandas/Numpy
CPSC 501
- Dr. J. Hudson
University of Calgary
Arshia Hosseini
T01/T02
Tut#15-16: Pandas/Numpy CPSC 501 Dr. J. Hudson University of - - PowerPoint PPT Presentation
Tut#15-16: Pandas/Numpy CPSC 501 Dr. J. Hudson University of Calgary Arshia Hosseini T01/T02 Basics The primary data structures in pandas are implemented as two classes: DataFrame , which you can imagine as a relational data table,
Arshia Hosseini
T01/T02
2
named columns.
more Series and a name for each Series.
3
4
5
6
7
are called axes. It also goes by its alias: numpy.array
be (n,m). The length of the shape tuple is therefore the number of axes, ndim.
the elements of shape.
elements of type float64 has itemsize 8 (=64/8)
need to use this attribute because we will access the elements in an array using indexing facilities.
8
9
10
placeholder content. These minimize the necessity of growing arrays, an expensive operation.
11
with the result.
12
numbers, regardless of its shape. However, by specifying the axis parameter you can apply an operation along the specified axis of an array:
13
14
15