Skip to content

Instantly share code, notes, and snippets.

@kvnkho
Last active August 11, 2022 02:21
Show Gist options
  • Select an option

  • Save kvnkho/d19914c15bba8db3fcd5f4c6ec0bf0a8 to your computer and use it in GitHub Desktop.

Select an option

Save kvnkho/d19914c15bba8db3fcd5f4c6ec0bf0a8 to your computer and use it in GitHub Desktop.
Extract step in Ploomber
import pandas as pd
# %% tags=["parameters"]
# declare a list tasks whose products you want to use as inputs
upstream = None
product = None
# %%
df = pd.DataFrame({"col1": [1,2,3], "col2":[2,3,4]})
df.to_parquet(product["data"])
@edublancas
Copy link

let's change this to the percent format since more people are familiar with it:

import pandas as pd

# %% tags=["parameters"]
# declare a list tasks whose products you want to use as inputs
upstream = None
product = None

# %%
df = pd.DataFrame({"col1": [1,2,3], "col2":[2,3,4]})
df.to_parquet(product["data"])

@kvnkho
Copy link
Author

kvnkho commented Aug 9, 2022

That is an easy change. Will get those tonight and then work on publishing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment