This is the first lesson!¶
This is a Jupyter Notebook, an interactive Python coding environment. What you'll see below is Python code that is dynamically computed. It's a simple addition, but just for demonstration purposes š:
2 + 2
from datetime import datetime
Days between 1st moon landing and beginning of year 2020:
(datetime(2020, 1, 1) - datetime(1969, 7, 20)).days
For example, click on the tab that says "Terminal 1"
to see an interactive linux terminal. We've hidden a text file with our contact info. Can you find it? š
Batteries included¶
We've packed the most popular Python libraries in Namespace. requests
, pandas
, matplotlib
, etc. Just import and start using them.
import pandas as pd
from matplotlib import pyplot as plt
import seaborn as sns
%matplotlib inline
Pokemon Time!¶
To demonstrate the capabilities of Namespace and the integrated Jupyter environment, we'll do a quick analysis of Pokemon data. To do this, we're importing pandas
, matplotlib
and seaborn
.
First, we'll read the CSV included in this lecture. Notice that it's a local dataset, it's included in our lecture.
df = pd.read_csv('pokemon.csv', index_col=0)
df.head()
stats_df = df.drop(['Total', 'Stage', 'Legendary'], axis=1)
sns.boxplot(data=stats_df)
corr = stats_df.corr()
# Heatmap
sns.heatmap(corr)
Accessing other views¶
Now try to use the Terminal view (click on the tab Terminal 1
) to fetch the data under contact.txt
and move to the next lesson!