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
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]); | |
} |
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
# List unique values in a DataFrame column | |
# h/t @makmanalp for the updated syntax! | |
df['Column Name'].unique() | |
# Convert Series datatype to numeric (will error if column has non-numeric values) | |
# h/t @makmanalp | |
pd.to_numeric(df['Column Name']) | |
# Convert Series datatype to numeric, changing non-numeric values to NaN | |
# h/t @makmanalp for the updated syntax! |
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 pandas as pd | |
import numpy as np | |
from fuzzywuzzy import process | |
import multiprocessing as mp | |
def multi_run_wrapper(args): | |
return process_df(*args) | |
def find_app_name(name, all_names): |
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
# -*- coding: utf-8 -*- | |
import pandas as pd | |
import numpy as np | |
from fuzzywuzzy import process | |
infileName = 'SF Account Names.csv' | |
sfData = pd.read_csv(infileName, header=0) | |
# print (sfData.keys()) | |
# print(sfData.head()) |
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
# -*- coding: utf-8 -*- | |
import pandas as pd | |
import numpy as np | |
from fuzzywuzzy import process | |
infileName = 'SF Account Names.csv' | |
sfData = pd.read_csv(infileName, header=0) | |
# print (sfData.keys()) | |
# print(sfData.head()) |
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
Sub Create_SF_Data_by_Cus() | |
Dim cn, objRes | |
Dim connectionString As String | |
Dim icount As Integer | |
On Error GoTo ErrHandler | |
Set cn = CreateObject("ADODB.connection") | |
connectionString = "Provider=Microsoft.ACE.oleDB.12.0; Data source = " & ThisWorkbook.FullName _ | |
& "; Extended Properties = ""Excel 12.0 Macro; HDR = NO, IMEX =1""" | |