You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm using Papermill to create a a directory with output notebooks. In those notebooks I have used sb.glue("Word Count", df_sum, "display") to glue a data frame then using sb.reglue in another. So, in this summary notebook I have the reglue("Word Count") for each of the files in the directory, which then displays ~70 of the same data frames run on different data using Papermill. I would like to take a sum of the values of a certain row across all of the data frames in this summary notebook that uses reglue. Is there a way that you suggest I go about doing this? I am having trouble because when I reglue I am unsure of how I can actually "touch" the data in the reglued data frame to do an operation across many, such as the sum. Thanks in advance!
The text was updated successfully, but these errors were encountered:
You can actually access the data that's reglue'd directly via scraps on an individual notebook and notebook_scraps/scraps on a collection of notebooks. Thus depending on how your glue'd data is setup you can iterate on over the scraps and extract the values you wish to sum.
For example to read the first row of each dataframe glued to the same name (glue_df_json in this case) it might look something like this:
sum(df_json[0]["result_column"] for scraps in books.notebook_scraps.values() for df_json in scraps["glue_df_json"])
Hello, I'm using Papermill to create a a directory with output notebooks. In those notebooks I have used sb.glue("Word Count", df_sum, "display") to glue a data frame then using sb.reglue in another. So, in this summary notebook I have the reglue("Word Count") for each of the files in the directory, which then displays ~70 of the same data frames run on different data using Papermill. I would like to take a sum of the values of a certain row across all of the data frames in this summary notebook that uses reglue. Is there a way that you suggest I go about doing this? I am having trouble because when I reglue I am unsure of how I can actually "touch" the data in the reglued data frame to do an operation across many, such as the sum. Thanks in advance!
The text was updated successfully, but these errors were encountered: