This file contains hidden or 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 sqlite3 | |
import pandas as pd | |
conn = sqlite3.connect("ladder.db") | |
# pd.read_sql("SELECT * FROM mytable;", conn) | |
This file contains hidden or 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 sqlite3 | |
import pandas as pd | |
conn = sqlite3.connect("ladder.db") | |
# pd.read_sql("SELECT * FROM mytable;", conn) | |
# pd.read_sql("SELECT * FROM pets;", conn) | |
# pd.read_sql("SELECT * FROM employees;", conn) |
This file contains hidden or 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
# ## Aggregating Statistics with GROUP BY | |
# 45) What is the average age of `pets` by species? | |
pd.read_sql("SELECT AVG(age) FROM pets GROUP BY species;", conn) | |
# dogs 6.5, cat 4.3, lobster 3 | |
# 46) Repeat the previous problem but make sure the species label is also displayed! | |
pd.read_sql("SELECT species, AVG(age) FROM pets GROUP BY species;", conn) | |
# Assume this behavior is always being asked of you any time you use `GROUP BY`. | |
# 47) What is the count, mean, minimum, and maximum age by species in `pets`? | |
pd.read_sql("SELECT species, COUNT(age), AVG(age), MIN(age), MAX(age) FROM pets GROUP BY species;", conn) |
This file contains hidden or 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
# ## Aggregating Statistics with GROUP BY | |
# 45) What is the average age of `pets` by species? | |
pd.read_sql("SELECT AVG(age) FROM pets GROUP BY species;", conn) | |
# dogs 6.5, cat 4.3, lobster 3 | |
# 46) Repeat the previous problem but make sure the species label is also displayed! | |
pd.read_sql("SELECT species, AVG(age) FROM pets GROUP BY species;", conn) | |
# Assume this behavior is always being asked of you any time you use `GROUP BY`. | |
# 47) What is the count, mean, minimum, and maximum age by species in `pets`? | |
pd.read_sql("SELECT species, COUNT(age), AVG(age), MIN(age), MAX(age) FROM pets GROUP BY species;", conn) |
This file contains hidden or 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
# ## Summary Statistics | |
# 32) How many rows are in the `pets` table? | |
pd.read_sql("SELECT COUNT(*) FROM pets;", conn) | |
# 13 | |
# 33) How many female pets are in the `pets` table? | |
pd.read_sql("SELECT COUNT(*) FROM pets WHERE sex = 'F'", conn) | |
# 7 | |
# 34) How many female cats are in the `pets` table? | |
pd.read_sql("SELECT COUNT(*) FROM pets WHERE sex = 'F' AND species = 'cat'", conn) | |
# 4 |
This file contains hidden or 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 sqlite3 | |
import pandas as pd | |
conn = sqlite3.connect("ladder.db") | |
# pd.read_sql("SELECT * FROM mytable;", conn) | |
# pd.read_sql("SELECT * FROM pets;", conn) | |
# pd.read_sql("SELECT * FROM employees;", conn) | |
# pd.read_sql("SELECT * FROM transactions;", conn) | |
pd.read_sql("SELECT * FROM yum;", conn) |
This file contains hidden or 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
students = [ | |
{"lname": "Kalama", "fname": "Samuel"}, | |
{"lname": "Kalani", "fname": "Shawn"}, | |
{"lname": "Kona", "fname": "Sid"}, | |
{"lname": "Kapena", "fname": "Stan"}, | |
] |
This file contains hidden or 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
<!-- Load in Chrome Version 67.0.3396.87 (Official Build) (64-bit) on Mac OS 10.13.5 --> | |
<!-- Click on the white square in the button that is the checkbox. It will NOT toggle. Click on button toggles. --> | |
<div class="btn-group" data-toggle="buttons"> | |
<label class="btn btn-primary active"> | |
<input type="checkbox" checked autocomplete="off"> Checkbox 1 (pre-checked) | |
</label> | |
<label class="btn btn-primary"> | |
<input type="checkbox" autocomplete="off"> Checkbox 2 |
This file contains hidden or 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
Phone Call | |
Permissions: | |
<uses-permission android:name="android.permission.CALL_PHONE" /> | |
Intent: | |
Intent callIntent = new Intent(Intent.ACTION_CALL); | |
callIntent.setData(Uri.parse("tel:0377778888")); | |
startActivity(callIntent); |
NewerOlder