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 doPost(e) { | |
| var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Data"); | |
| var toLog = handleTalkusEvent(e.postData.contents); | |
| if (!toLog) { | |
| return; | |
| } | |
| // Improve this by getting first row column names | |
| sheet.appendRow([toLog.endTime, toLog.channelName, toLog.userAsking, toLog.userAskingJoinTime, toLog.firstResponder, toLog.firstResponseTime, toLog.messages]); | |
| } |
| """Parse Salesforce report data in Python | |
| details in my answer https://stackoverflow.com/a/45645135/448474 | |
| """ | |
| from collections import OrderedDict | |
| from simple_salesforce import Salesforce | |
| import pandas as pd | |
| import json |
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/python | |
| # Dispatch - synchronize two folders | |
| import os | |
| import filecmp | |
| import shutil | |
| from stat import * | |
| class Dispatch: | |
| ''' This class represents a synchronization object ''' |