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)
function uploadData() { | |
var accountId = "xxxxxxxx"; | |
var webPropertyId = "UA-xxxxxxxx-x"; | |
var customDataSourceId = "xxxxxxxx"; | |
var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
var maxRows = ss.getLastRow(); | |
var maxColumns = ss.getLastColumn(); | |
var data = []; | |
for (var i = 1; i <= maxRows;i++) { | |
data.push(ss.getRange([i], 1,1, maxColumns).getValues()); |
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)
// this is the background code... | |
// listen for our browerAction to be clicked | |
chrome.browserAction.onClicked.addListener(function (tab) { | |
// for the current tab, inject the "inject.js" file & execute it | |
chrome.tabs.executeScript(tab.ib, { | |
file: 'inject.js' | |
}); | |
}); |
/** | |
* Fetching data from BigQuery and present it in our sheet | |
* Author: Ido Green | |
* Date: 14/12/2013 | |
* | |
* See: https://greenido.wordpress.com/2013/12/16/big-query-and-google-spreadsheet-intergration/ | |
* Misc: https://developers.google.com/bigquery/ | |
*/ | |
// |
Key/Command | Description |
---|---|
Tab | Auto-complete files and folder names |
Ctrl + A | Go to the beginning of the line you are currently typing on |
Ctrl + E | Go to the end of the line you are currently typing on |
Ctrl + U | Clear the line before the cursor |
Ctrl + K | Clear the line after the cursor |
Ctrl + W | Delete the word before the cursor |
Ctrl + T | Swap the last two characters before the cursor |
Zen Of Javascript | |
Build functionality, not architecture. | |
Build small things that work | |
and glue them together to make big things. | |
Clear is better than clever, | |
but graceful beats both. | |
Comments are good, even if you're Dutch. | |
Asychronous is better than synchronous | |
except for when it isn't |