id | name | score | year |
---|---|---|---|
33CC | Zamani | C | 2020 |
33CC | Zamani | B | 2019 |
44DD | Ayo | A | 2020 |
44DD | Ayo | B | 2019 |
55EE | Ahmad | null | null |
11AA | Adebayo | null | null |
22BB | Chioma | null | null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import packages and set up | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
pd.set_option('display.max_columns', None) | |
pd.set_option('display.max_rows', None) | |
pd.set_option('display.width', None) |
5x + 4y = 1
3x - 6y = 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyspark import SparkConf, SparkContext | |
conf = SparkConf().setMaster("local").setAppName("SubjectsByClass") | |
sc = SparkContext(conf=conf) | |
def get_class_and_subject(entry): | |
fields = entry.split(',') | |
class_id = fields[1] | |
number_of_subjects = int(fields[2]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
fig, ax = plt.subplots(); | |
plt.show() | |
# equivalents to above - different ways of creating an axes | |
# 1a - | |
# ax = plt.subplot() | |
# plt.show() | |
# 1b - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numbers = [2, 9, 1, 4, 0] | |
new_numbers = [] | |
for number in numbers: | |
new_numbers.append(number + 3) | |
print(new_numbers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = [11, 12, 13, 14, 15] | |
y = [1, 2, 3, 4, 5] | |
print(x/y) | |
# python would throw an error for this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT name, score, activity, a.year | |
FROM person AS p | |
INNER JOIN grade AS g | |
USING(id) | |
INNER JOIN activity AS a | |
USING(id, year) |
NewerOlder