Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create type pddesctype as(
- count float,
- mean float,
- std float,
- min float
- );
- create function pddesc(x numeric[])
- returns pddesctype
- as $$
- import pandas as pd
- data=pd.Series(x)
- count=data.describe()[0]
- mean=data.describe()[1]
- std=data.describe()[2]
- min=data.describe()[3]
- return count, mean, std, min
- $$ language plpython3u;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement