SQL-like Window Functions in Pandas

How to write SQL-like window functions in Pandas using groupby and transform