Created
May 3, 2019 22:21
-
-
Save Zlatkovsky/3890dae8bebb53658e04efbbb6f3f46d to your computer and use it in GitHub Desktop.
A basic Custom Function, written in Python
This file contains 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
name: CF Python Demo | |
description: 'A basic Custom Function, written in Python' | |
host: EXCEL | |
api_set: {} | |
script: | |
content: |- | |
import customfunctions as cf | |
@cf.customfunction("ADD") | |
def myadd(x, y): | |
return x + y | |
import statistics | |
@cf.customfunction("PYSTDEV", | |
parameters=[ | |
cf.ParameterInfo(dimensionality=cf.Dimensionality.matrix)]) | |
def pystdev(data): | |
flatList = [item for sublist in data for item in sublist] | |
return statistics.stdev(flatList) | |
language: python |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment