Skip to content

Instantly share code, notes, and snippets.

@adilek
Last active November 18, 2020 23:37
Show Gist options
  • Save adilek/1d462df7073425772922b6c6020f794a to your computer and use it in GitHub Desktop.
Save adilek/1d462df7073425772922b6c6020f794a to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Lets see the sample data from each dataset"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>username</th>\n",
" <th>first_name</th>\n",
" <th>last_name</th>\n",
" <th>birth_year</th>\n",
" <th>points</th>\n",
" <th>email</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>john</td>\n",
" <td>John</td>\n",
" <td>Smith</td>\n",
" <td>1985</td>\n",
" <td>5</td>\n",
" <td>[email protected]</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>jack</td>\n",
" <td>Jack</td>\n",
" <td>Wilson</td>\n",
" <td>1994</td>\n",
" <td>15</td>\n",
" <td>[email protected]</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3</td>\n",
" <td>clara</td>\n",
" <td>Clara</td>\n",
" <td>Setkin</td>\n",
" <td>1988</td>\n",
" <td>8</td>\n",
" <td>[email protected]</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4</td>\n",
" <td>ann</td>\n",
" <td>Anna</td>\n",
" <td>Johnson</td>\n",
" <td>1964</td>\n",
" <td>10</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5</td>\n",
" <td>noah.eli</td>\n",
" <td>Noah</td>\n",
" <td>Eli</td>\n",
" <td>1980</td>\n",
" <td>2</td>\n",
" <td>[email protected]</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" id username first_name last_name birth_year points email\n",
"0 1 john John Smith 1985 5 [email protected]\n",
"1 2 jack Jack Wilson 1994 15 [email protected]\n",
"2 3 clara Clara Setkin 1988 8 [email protected]\n",
"3 4 ann Anna Johnson 1964 10 NaN\n",
"4 5 noah.eli Noah Eli 1980 2 [email protected]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"users.head()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>course_name</th>\n",
" <th>instructor</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>Intro to Computer Science</td>\n",
" <td>John Lennon</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>Data Science applications</td>\n",
" <td>Michael Jackson</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3</td>\n",
" <td>Database management systems</td>\n",
" <td>Shakira</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4</td>\n",
" <td>Intro to Discreet Math</td>\n",
" <td>Beyonce</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5</td>\n",
" <td>Intro to Calculus</td>\n",
" <td>Jennifer Lopez</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" id course_name instructor\n",
"0 1 Intro to Computer Science John Lennon\n",
"1 2 Data Science applications Michael Jackson\n",
"2 3 Database management systems Shakira\n",
"3 4 Intro to Discreet Math Beyonce\n",
"4 5 Intro to Calculus Jennifer Lopez"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"courses.head()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>user_id</th>\n",
" <th>course_id</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3</td>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" <td>4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5</td>\n",
" <td>5</td>\n",
" <td>5</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" id user_id course_id\n",
"0 1 1 2\n",
"1 2 2 1\n",
"2 3 3 4\n",
"3 4 4 4\n",
"4 5 5 5"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"attendace.head()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
@alfilart
Copy link

I was checking this out, but I could not find the datasets users.csv, courses.csv, attendance.csv
Would it be possible to provide us this data so we can follow this course. Thanks

@adilek
Copy link
Author

adilek commented Nov 18, 2020

Hi,
Unfortunately I can't find them at the moment. They were simple actually. You can copy paste these tables and put into a CSV file. It will be fine. Ping me if you need further help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment