This message was deleted.
# ask-anything
s
This message was deleted.
e
maybe you're passing
product
to the function that stores the
get.csv
instead of
product[key]
?
can you show the code for the get task?
y
sure - just generated code with
ploomber skaffold
Copy code
import pandas as pd
from sklearn import datasets


def get(product):
    d = datasets.load_iris()
    df = pd.DataFrame(d['data'])

    df.columns = d['feature_names']
    df['target'] = d['target']
    df.to_csv(product, index=False)
e
ah yes. i see the problem. so functions cannot generate output notebooks. if you want an output notebook, your source must be a script or a notebook. if you want to keep the function, then remove the
nb: outputs/raw/get.ipynb
and then in your get function change
<http://df.to|df.to>_csv(product, index=False)
to
<http://df.to|df.to>_csv(product['data'], index=False)
🙌 1
y
Ah, ok - gotcha. So the step itself must be a script or notebook. Thanks! Will try that
👍 1