Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00...

33
Data to Information: NumPy and Pandas “From bits to information”

Transcript of Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00...

Page 1: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Data to Information: NumPy and Pandas

“Frombitstoinformation”

Page 2: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Outline

• DatatoInformation.• ArraysandMatrices.• Python:Arrays,ListsandDictionaries.• NumPy.• Pandas.• Tuples

Page 3: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Data to Information

Page 4: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Data formats

Page 5: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Lists and Tuples [] ()

“Frombitstoinformation”

Page 7: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Arrays

Page 8: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Arrays

Page 9: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Lists

Code

List–Cancontainsstringsandnumericvalues

Squarebracketsforalist

Tuple:val=(4,5,3)Immutable–cannotchange

Page 11: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Dictionaries

Code

Dictionaries–accessedbykeyword

Page 12: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Dictionaries

Code

Page 13: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Arrays, Lists and Dictionaries: Using NumPy

Code

Page 14: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Arrays, Lists and Dictionaries: Using a Dataframe

Code

Page 15: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

NumPy

“Frombitstoinformation”

Page 17: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

NumPy: Linear Equation Solving

Code

Page 19: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

NumPy Maths Operations

Code

Page 20: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

NumPy Array Operations

Code

Page 21: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

NumPy: Matrix Operations

Code

Page 22: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

NumPy: Bitwise

Code

Page 23: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Pandas

“Frombitstoinformation”

Page 25: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Pandas: Data Types

Page 26: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Pandas: Len() and Columns

Code

Page 27: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Pandas: Columns

Code

Page 28: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Pandas: Describe()

Code

Page 29: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Pandas: Sorting

Code

Page 30: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Pandas: Correlate()

Code

Page 31: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Pandas: Filtering

Code

Page 32: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Tuples

“Frombitstoinformation”

Page 33: Data to Information: NumPy and PandasData os Subject 00 o o 0.25 0.20 0.15 0.10 0.05 0.00 Information Q) 0 00 Normal Histogram RNG 9.0 and 2. O 10 Charting Tools 15 20 Hypothesis

Data to Information: NumPy and Pandas

“Frombitstoinformation”