Intro Python Data Analysis Part1
Intro Python Data Analysis Part1
Intro Python Data Analysis Part1
Lewys Brace
[email protected]
Aims of the course
• Provide you with a basic understanding of programming in Python
• Basic programming architecture and logic.
• Introduction to key packages used by Python programmers for data
analysis.
• How to conduct basic data analysis in Python.
• Focus on the more “common” aspects of Python programming.
• Learn that Google is your best friend.
An introduction to coding with Python
• String (str)
• Boolean (bool)
• Complex (complex)
• The print() function is used to print something
• […] to the screen.
• User defined (classes) • Create an integer, float, and string variable.
• Print these to the screen.
• Play around using different variable names,
etc.
• You can always check the type of a variable using the type() function.
In: Out:
In: Out:
Arithmetic operators
The arithmetic operators: • Write a couple of operations
• Addition: + using the arithmetic operators,
• Subtract: - and print the results to the
screen.
• Multiplication: *
• Division: / In: Out:
• Power: **
A quick note on the increment operator
shorthand
• Python has a common idiom that is not necessary, but which is used frequently and is
therefore worth noting:
x += 1
Is the same as:
x=x+1
Out:
Working with strings
In: Out: