Course Structure and Setup
Clone the materials locally
Set up your environment variables
Perform the exercises in setting up your Python environment
Pull external data into Python
pip install requests
to install the Requests library.python
or python3
to launch the Python interpreter.Troubleshooting
requests
library is installed correctly, this code should execute without errors, and response.status_code
should return 200, which is the HTTP status code for a successful request.If the requests library is not installed, Python will raise an ImportError, indicating that the requests module is not found.Sample Output
Applications
requests
library,
you can easily pull data from APIs, websites, and other online sources directly into Python for further analysis and processing. Did you know?
The data you just pulled in the total historical market capitalization of the IDX (Indonesian Stock Exchange) from 1995 to 2023.
In fact, it is used in this visualization on a financial intelligence app we’ve built:Use Pandas and Matplotlib
pandas
is a powerful data manipulation library that allows you to work with structured data in Python.matplotlib
is a plotting library that enables you to create visualizations from your data. We’ll be using
these libraries extensively throughout the Python data analysis courses.pip install pandas matplotlib
in your terminal.Then, run the following code snippet to visualize the data you pulled in the previous step:Troubleshooting
pandas
and matplotlib
are installed correctly, this code should execute without errors, and it will
use the matplotlib
library to plot the market capitalization data. Calling plt.show()
will display the plot in a new window.
pandas
or matplotlib
is not installed, Python will raise an ImportError,
indicating that the module is not found.
Sample Output