Python Tutorial : Introduction to Python for Finance

Adina Howe introduces Python for analyzing financial data, walking through the Datacamp environment and IPython shell. You'll learn how to run and save code, then start with basic arithmetic operators for financial calculations.
Chapters
Hello and welcome to Introduction to Python for Finance. My name is Adina Howe and I will be your instructor for this course. In this course, you'll use Python to explore financial data. You'll be accomplishing this through video lessons like this one, followed by interactive exercises that will give you a chance to write Python code. Python is a general purpose programming language and is easy to learn. Nowadays, you'll find Python being used in practically any piece of software. One reason for this is that it is a glue language, meaning it can easily be used with other programming languages. The use of Python is broad also because it's open source, meaning it's free to use. This means anyone can use and share Python code. Finally, Python has become popular, as you'll find out shortly, because programming in Python is fun. Let me give you a tour of the workspace for this course. In Datacamp's Python courses, you'll be working with the IPython shell. This is the interactive command center for programming in Python and is short for Interactive Python shell. In the IPython shell, you can type Python code, run it, and immediately see the results. For example, one could type in a python command such as 11 run the command and see the results. In Datacamp's interface, the IPython shell is located on the bottom right in the exercises. Consider it a scratch pad to practice code in Python. You can also execute the code as a script. Scripts are a set of commands that are executed in the order that they are written in datacamp. Scripts are written in the upper right corner. All code that is written in datacamp's script interface is saved automatically when you hit Run code, the code within the script is executed and you can see the output in the IPython shell located at the bottom right. When you hit Submit answer, your code is not only executed, but also checked against the correct solution. You can use Python to perform common mathematical operations such as addition and multiplication. Some of these operators are shown on the slide here. For example, if you want to add 8 to 4, you would use the addition operator as shown here to obtain a result of 12. Similarly, if you want to divide 8 by 4, you would use the division operator, I.e. the forward slash, to obtain the result of 2. Now that you've learned about the IPython interface and scripts, let's practice writing your first Python commands and getting more familiar with the datacamp interface.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







