From the course: Build Three Real-World Python Applications
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
How to put stock data into a DataFrame - Python Tutorial
From the course: Build Three Real-World Python Applications
How to put stock data into a DataFrame
- It is nice to have our data pulled into Python with tuples and BeautifulSoup but many programmers like being able to store their data in a data frame to use the full potential of the pandas package. I will show how to do this for both methods. Let's begin by showing how to do this for the request method. We are going to begin by typing an our URL variable. We will Copy + Paste in that time series weekly URL we had earlier with the + string API key at the end. And this time we are going to add one extra thing to the end. So we are going to do + and then in quotation marks, we will have the & sign and then datatype=csv. Make sure this is typed exactly with no extra spaces. After this, we can gather our R variable, and equal it to request.get on our URL variable, and this time make sure you add .content on the end to help us gather the data. Next, we have our data variable, and we are going to equal it to pd.read_csv.…
Contents
-
-
-
-
What are APIs?2m 16s
-
(Locked)
Introducing Alpha Vantage API4m 1s
-
(Locked)
How to access Alpha Vantage data3m 7s
-
(Locked)
How to use an API key5m 32s
-
(Locked)
How to pull stock data with the alpha_vantage package: Part 14m 5s
-
(Locked)
How to pull stock data with the alpha_vantage package: Part 22m 1s
-
(Locked)
How to pull stock data with the requests package5m 55s
-
(Locked)
How to put stock data into a DataFrame6m 8s
-
(Locked)
How to use Alpha Vantage functions: Part 14m 5s
-
(Locked)
How to use Alpha Vantage functions: Part 23m 21s
-
(Locked)
How to use Alpha Vantage functions: Part 36m 25s
-
(Locked)
Challenge: Analyze Microsoft stock2m 31s
-
(Locked)
Solution: Analyze Microsoft stock2m 32s
-
-
-