A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
#!/usr/bin/env bash | |
echo ' ' | |
echo ' ' | |
echo "☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ " | |
echo "================================== трудящихся мира, объединиться! ====================================" | |
echo "☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ . ☭ " | |
echo ' ' | |
echo "****************,**,*****,***,,,,,,,....,........,................................... .............. | |
*****,***,****,,,,,**,,**,*,,,,,,,,,.......,**,..,.............................. ...... ... ....... |
-- example http://clarkdave.net/2013/06/what-can-you-do-with-postgresql-and-json/ | |
createdb json_test | |
psql json_test | |
CREATE TABLE books ( id integer, data json ); | |
INSERT INTO books VALUES (1, '{ "name": "Book the First", "author": { "first_name": "Bob", "last_name": "White" } }'); | |
INSERT INTO books VALUES (2, '{ "name": "Book the Second", "author": { "first_name": "Charles", "last_name": "Xavier" } }'); |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
# E-mails | |
DEFAULT_FROM_EMAIL = 'Nome <[email protected]>' | |
EMAIL_USE_TLS = True | |
EMAIL_HOST = 'smtp.gmail.com' | |
EMAIL_HOST_USER = '[email protected]' | |
EMAIL_HOST_PASSWORD = 'senha' | |
EMAIL_PORT = 587 |
# Some good references are: | |
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x | |
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ | |
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392 | |
#1. Install PostgreSQL postgis and postgres | |
brew install postgis | |
initdb /usr/local/var/postgres | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start |