Thursday, July 12, 2018

Add multiple columns to Pandas dataframe by applying a function that returns multiple values

df[['sum', 'difference']] = df.apply(
    lambda row: pd.Series(myfunc(row['a'], row['b'])), axis=1)
# The pd.Series is the key!

my-alpine and docker-compose.yml

 ``` version: '1' services:     man:       build: .       image: my-alpine:latest   ```  Dockerfile: ``` FROM alpine:latest ENV PYTH...