Problem: would like to use pivot_table
[1] to pivot and ignore irrelevant columns
in the DataFrame
.
Given the DataFrame
df = pd.DataFrame(
{
#!/usr/bin/python3 | |
""" | |
Copyright 2021 Mygod | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
import psycopg2 | |
from contextlib import closing | |
""" | |
Demonstrate that contextmanagers for closing and committing don't play well together without autocommit | |
Only the noclosing function can run without error | |
""" |
I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.
So it might be really unintuitive at first but lambda functions have three states.
/* | |
* derivative work of Matheus de Oliveira's json_manipulator.sql | |
* https://gist.github.com/matheusoliveira/9488951 | |
* | |
* adapted to support postgresql 9.4 jsonb type | |
* no warranties or guarantees of any kind are implied or offered | |
* | |
* license is as Matheus conferred it on 4/9/2015: | |
* matheusoliveira commented on Apr 9 | |
* @hannes-landeholm, I'd like to take credit if you share them |
If you were to give recommendations to your "little brother/sister" on things that they need to do to become a data scientist, what would those things be?
I think the "Data Science Venn Diagram" (http://drewconway.com/zia/2013/3/26/the-data-science-venn-diagram) is a great place to start. You need three things to be a good data scientist:
import pandas as pd | |
from matplotlib import pyplot as plt | |
import matplotlib as mpl | |
import seaborn as sns | |
%matplotlib inline | |
#Read in data & create total column | |
stacked_bar_data = pd.read_csv("C:\stacked_bar.csv") | |
stacked_bar_data["total"] = stacked_bar_data.Series1 + stacked_bar_data.Series2 |
Dionysis Zindros, National Technical University of Athens dionyziz@gmail.com
pseudonymous anonymous web-of-trust identity trust bitcoin namecoin proof-of-burn timelock decentralized anonymous marketplace openbazaar
Dionysis Zindros, National Technical University of Athens dionyziz@gmail.com
pseudonymous anonymous web-of-trust identity trust bitcoin namecoin proof-of-burn timelock decentralized anonymous marketplace openbazaar
#!/bin/bash | |
BASE_DIR=/mnt/upload | |
if [[ -z "$*" ]]; then | |
echo "Usage: Please supply the list of disks you wish to reformat. (see fdisk -l)" | |
echo "$0 /dev/some-disk /dev/some-other-disk" | |
exit 1 | |
fi |