{
  "id": "task_libraries:data-analysis/python",
  "path": "/exapedia/python-data-analysis-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python data analysis libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python data analysis libraries load tables of data and filter, join, group, and summarize them. These libraries prepare the data behind reports, dashboards, and machine learning models."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python data analysis libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#pandas",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F138"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pyarrow",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F156"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#duckdb",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#polars",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F195"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pyspark",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F213"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#dask",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F234"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#xarray",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F252"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#ibis-framework",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F272"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F273"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F281"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F276"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F274"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#pandas",
          "label": [
            {
              "t": "fact",
              "fact": "F1"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F2"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Deferred execution",
            "SQL over frames"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#pandas",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F138"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pyarrow",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F156"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#duckdb",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#polars",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F195"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pyspark",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F213"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#dask",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F234"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#xarray",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F252"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#ibis-framework",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F272"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F282"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F283"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "pandas",
          "name": [
            {
              "t": "fact",
              "fact": "F138"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pandas-dev/pandas"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/pandas"
            },
            {
              "label": "Docs",
              "href": "https://pandas.pydata.org/docs/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "pandas holds tabular data in a "
            },
            {
              "t": "code",
              "text": "DataFrame"
            },
            {
              "t": "text",
              "text": ", a table of labeled columns that can each hold a different type, such as text, numbers, or dates. Operations run as soon as they are called and keep the whole table in memory. The library aligns rows by label in arithmetic, groups data for split-apply-combine operations, and marks missing values as "
            },
            {
              "t": "code",
              "text": "NaN"
            },
            {
              "t": "text",
              "text": ", "
            },
            {
              "t": "code",
              "text": "NA"
            },
            {
              "t": "text",
              "text": ", or "
            },
            {
              "t": "code",
              "text": "NaT"
            },
            {
              "t": "text",
              "text": ". Readers and writers cover CSV files, Excel files, and SQL databases."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pandas.pydata.org/docs/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F138"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Data must fit in memory"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Each operation loads its data into RAM. Larger datasets need chunked reading or another engine, such as Dask or Polars."
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Parallel work needs numba"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Parallel column-wise computation runs only through the optional numba engine."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/freqtrade/freqtrade",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F154"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def ohlcv_fill_up_missing_data(\n    dataframe: DataFrame,\n    timeframe: str,\n    pair: str,\n    candle_type: CandleType = CandleType.SPOT,\n) -> DataFrame:\n    \"\"\"\n    Fills up missing data with 0 volume rows,\n    using the previous close as price for \"open\", \"high\", \"low\" and \"close\", volume is set to 0\n\n    Candle types that carry a single value (e.g. funding rates) have no candle to fabricate -\n    inventing one would silently make up rates - so they are returned unchanged.\n    \"\"\"\n    if not candle_type_is_ohlcv(candle_type):\n        logger.debug(f\"Skipping fillup for {pair}, {timeframe} - not applicable to {candle_type}.\")\n        return dataframe\n\n    from freqtrade.exchange import timeframe_to_resample_freq\n\n    ohlcv_dict = {\"open\": \"first\", \"high\": \"max\", \"low\": \"min\", \"close\": \"last\", \"volume\": \"sum\"}\n    resample_interval = timeframe_to_resample_freq(timeframe)\n    # Resample to create \"NAN\" values\n    df = dataframe.resample(resample_interval, on=\"date\").agg(ohlcv_dict)\n\n    # Forwardfill close for missing columns\n    df[\"close\"] = df[\"close\"].ffill()\n    # Use close for \"open, high, low\"\n    df.loc[:, [\"open\", \"high\", \"low\"]] = df[[\"open\", \"high\", \"low\"]].fillna(\n        value={\n            \"open\": df[\"close\"],\n            \"high\": df[\"close\"],\n            \"low\": df[\"close\"],\n        }\n    )\n    df = df.reset_index()\n    len_before = len(dataframe)\n    len_after = len(df)\n    pct_missing = (len_after - len_before) / len_before if len_before > 0 else 0\n    if len_before != len_after:\n        message = (\n            f\"Missing data fillup for {pair}, {timeframe}: \"\n            f\"before: {len_before} - after: {len_after} - {pct_missing:.2%}\"\n        )\n        if pct_missing > 0.01:\n            logger.info(message)\n        else:\n            # Don't be verbose if only a small amount is missing\n            logger.debug(message)\n    return df\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/freqtrade/freqtrade/blob/b6d30da09b6745065bf60d464286ebb1b889ccbe/freqtrade/data/converter/converter.py#L128-L176",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F153"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20pandas%20for%20timestamp%20normalization%2C%20ordered%20row%20indexes%2C%20aligned%20chunk%20selection%20and%20dataframe%20materialization&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F138"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import pandas as pd\n\nd = {\"col1\": [1, 2], \"col2\": [3, 4]}\ndf = pd.DataFrame(data=d)\nprint(df)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "pandas.DataFrame.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F143"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pyarrow",
          "name": [
            {
              "t": "fact",
              "fact": "F156"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/apache/arrow"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/pyarrow"
            },
            {
              "label": "Docs",
              "href": "https://arrow.apache.org/docs/python/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "PyArrow is the Python library for Apache Arrow, a columnar memory format for tabular data. "
            },
            {
              "t": "code",
              "text": "pa.table"
            },
            {
              "t": "text",
              "text": " builds a typed, column-oriented table from arrays, and the library converts to and from pandas and NumPy. Polars and DuckDB read Arrow data directly, so a table can pass between them without a copy. Its Acero engine and dataset scanner run deferred queries over collections of files."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F159"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://arrow.apache.org/docs/python/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F156"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Shared column format"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Polars, DuckDB, and pandas exchange data through Arrow tables instead of converting row by row."
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Windows wheels need a runtime"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Importing the pip wheels on Windows can require the latest Visual C++ Redistributable."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/huggingface/datasets",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F175"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def table_iter(table: Table, batch_size: int, drop_last_batch=False) -> Iterator[pa.Table]:\n    \"\"\"Iterate over sub-tables of size `batch_size`.\n\n    Args:\n        table (`pyarrow.Table`):\n            PyArrow table to iterate over.\n        batch_size (`int`):\n            Size of each sub-table to yield.\n        drop_last_batch (`bool`, defaults to `False`):\n            Drop the last batch if it is smaller than `batch_size`.\n    \"\"\"\n    chunks_buffer = []\n    chunks_buffer_size = 0\n    for chunk in table.to_reader(max_chunksize=batch_size):\n        if len(chunk) == 0:\n            continue\n        elif chunks_buffer_size + len(chunk) < batch_size:\n            chunks_buffer.append(chunk)\n            chunks_buffer_size += len(chunk)\n            continue\n        elif chunks_buffer_size + len(chunk) == batch_size:\n            chunks_buffer.append(chunk)\n            yield pa.Table.from_batches(chunks_buffer)\n            chunks_buffer = []\n            chunks_buffer_size = 0\n        else:\n            cropped_chunk_length = batch_size - chunks_buffer_size\n            chunks_buffer.append(chunk.slice(0, cropped_chunk_length))\n            yield pa.Table.from_batches(chunks_buffer)\n            chunks_buffer = [chunk.slice(cropped_chunk_length, len(chunk) - cropped_chunk_length)]\n            chunks_buffer_size = len(chunk) - cropped_chunk_length\n    if not drop_last_batch and chunks_buffer:\n        yield pa.Table.from_batches(chunks_buffer)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/huggingface/datasets/blob/39fd698d619816099ffa8eb07b5c79b0f4f5f299/src/datasets/table.py#L2475-L2507",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F174"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=pyarrow%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F156"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import pyarrow as pa\nn_legs = pa.array([2, 4, 5, 100])\nanimals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\nnames = [\"n_legs\", \"animals\"]\npa.table({\"n_legs\": n_legs, \"animals\": animals})\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://arrow.apache.org/docs/python/generated/pyarrow.table.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "pyarrow.table.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F161"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "duckdb",
          "name": [
            {
              "t": "fact",
              "fact": "F177"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/duckdb/duckdb-python"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/duckdb"
            },
            {
              "label": "Docs",
              "href": "https://duckdb.org/docs/2.0/clients/python/overview"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "DuckDB is an analytical SQL database that runs inside the Python process, with no server and no external dependencies. "
            },
            {
              "t": "code",
              "text": "duckdb.sql"
            },
            {
              "t": "text",
              "text": " runs a query and returns a relation, and a query can name a pandas DataFrame or an Arrow table in its "
            },
            {
              "t": "code",
              "text": "FROM"
            },
            {
              "t": "text",
              "text": " clause as if it were a database table. DuckDB reads and writes CSV, Parquet, and JSON files, locally or in remote storage buckets, and processes workloads larger than memory."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://duckdb.org/docs/2.0/clients/python/overview",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F177"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Some aggregates stay in memory"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Aggregate states that cannot spill to disk must fit in available memory."
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Relations rerun on access"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "A relation runs its query again each time it is read. Materializing the result avoids the repeat work."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/duckdb/dbt-duckdb",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def load_source(self, plugin_name: str, source_config: utils.SourceConfig):\n    if plugin_name not in self._plugins:\n        raise Exception(\n            f\"Plugin {plugin_name} not found; known plugins are: \"\n            + \",\".join(self._plugins.keys())\n        )\n    plugin = self._plugins[plugin_name]\n    handle = self.handle()\n    cursor = handle.cursor()\n\n    if source_config.schema:\n        cursor.execute(f\"CREATE SCHEMA IF NOT EXISTS {source_config.schema}\")\n\n    save_mode = source_config.get(\"save_mode\", \"overwrite\")\n    if save_mode in (\"ignore\", \"error_if_exists\"):\n        params = [source_config.schema, source_config.identifier]\n        q = \"\"\"SELECT COUNT(1)\n            FROM system.information_schema.tables\n            WHERE table_schema = ?\n            AND table_name = ?\n            \"\"\"\n        if source_config.database:\n            q += \"AND table_catalog = ?\"\n            params.append(source_config.database)\n        # fetchall() drains the result; DuckDB 2.0 rejects register() on a cursor\n        # whose result was only partially fetched.\n        if cursor.execute(q, params).fetchall()[0][0]:\n            if save_mode == \"error_if_exists\":\n                raise Exception(f\"Source {source_config.table_name()} already exists!\")\n            else:\n                # Nothing to do (we ignore the existing table)\n                return\n    df = plugin.load(source_config)\n    assert df is not None\n\n    materialization = source_config.meta.get(\n        \"materialization\", plugin.default_materialization()\n    )\n    source_table_name = source_config.table_name()\n    df_name = source_table_name.replace(\".\", \"_\") + \"_df\"\n\n    cursor.register(df_name, df)\n\n    if materialization == \"view\":\n        # save to df instance to register on each cursor creation\n        self._REGISTERED_DF[df_name] = df\n\n    cursor.execute(\n        f\"CREATE OR REPLACE {materialization} {source_table_name} AS SELECT * FROM {df_name}\"\n    )\n\n    cursor.close()\n    handle.close()\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/duckdb/dbt-duckdb/blob/e14e11c2c362230c10f42ae12ed3d942ca871a08/dbt/adapters/duckdb/environments/local.py#L96-L148",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F192"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20duckdb%20for%20timestamp%20normalization%2C%20ordered%20row%20indexes%2C%20aligned%20chunk%20selection%20and%20dataframe%20materialization&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F177"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import duckdb\n\nduckdb.sql(\"SELECT 42\").show()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://duckdb.org/docs/2.0/clients/python/overview.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "overview.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F182"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "polars",
          "name": [
            {
              "t": "fact",
              "fact": "F195"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pola-rs/polars"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/polars"
            },
            {
              "label": "Docs",
              "href": "https://docs.pola.rs/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Polars is a dataframe query engine written in Rust. Queries go through its expression API, through SQL, or through both, and share one optimizer. Functions such as "
            },
            {
              "t": "code",
              "text": "pl.scan_parquet"
            },
            {
              "t": "text",
              "text": " start a lazy query that runs at "
            },
            {
              "t": "code",
              "text": "collect"
            },
            {
              "t": "text",
              "text": ", after Polars has optimized it, with execution spread across all CPU cores. Operations that exceed RAM can spill to disk, and data passes to other tools in the Arrow format without copying."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.pola.rs/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F195"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F71"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Streaming falls back to memory"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Operations the streaming engine does not support run on the in-memory engine instead."
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "text",
                  "text": "SQL trails expressions"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "New features reach the expression API before the SQL interface."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/narwhals-dev/narwhals",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F211"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@classmethod\ndef from_dicts(\n    cls,\n    data: Sequence[Mapping[str, Any]],\n    /,\n    *,\n    context: _LimitedContext,\n    schema: Mapping[str, IntoDType | None] | None,\n) -> Self:\n    pl_schema = (\n        {\n            key: narwhals_to_native_dtype(dtype, context._version)\n            if dtype is not None\n            else None\n            for (key, dtype) in schema.items()\n        }\n        if schema\n        else None\n    )\n    if not data:\n        native = pl.DataFrame(schema=pl_schema)\n    elif FROM_DICTS_ACCEPTS_MAPPINGS or isinstance(data[0], dict):\n        native = pl.from_dicts(data, pl_schema)\n    else:  # pragma: no cover\n        columns = pl_schema or tuple(data[0])\n        native = pl.DataFrame(\n            (tuple(row.values()) for row in data), schema=columns, orient=\"row\"\n        )\n\n    return cls.from_native(native, context=context)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/narwhals-dev/narwhals/blob/98d36ec24a05bd9b58f227d5ec5aafcd87eca1c8/src/narwhals/_polars/dataframe.py#L361-L390",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F210"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20polars%20for%20timestamp%20normalization%2C%20ordered%20row%20indexes%2C%20aligned%20chunk%20selection%20and%20dataframe%20materialization&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F195"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import polars as pl\nimport datetime as dt\n\ndf = pl.DataFrame(\n    {\n        \"name\": [\"Alice Archer\", \"Ben Brown\", \"Chloe Cooper\", \"Daniel Donovan\"],\n        \"birthdate\": [\n            dt.date(1997, 1, 10),\n            dt.date(1985, 2, 15),\n            dt.date(1983, 3, 22),\n            dt.date(1981, 4, 30),\n        ],\n        \"weight\": [57.9, 72.5, 53.6, 83.1],  # (kg)\n        \"height\": [1.56, 1.77, 1.65, 1.75],  # (m)\n    }\n)\n\nprint(df)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.pola.rs/user-guide/getting-started/",
                  "label": [
                    {
                      "t": "text",
                      "text": "getting-started.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F200"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pyspark",
          "name": [
            {
              "t": "fact",
              "fact": "F213"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/apache/spark"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/pyspark"
            },
            {
              "label": "Docs",
              "href": "https://spark.apache.org/docs/4.3.0/api/python/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "PySpark is the Python API for Apache Spark, an engine for large-scale data processing. A "
            },
            {
              "t": "code",
              "text": "SparkSession"
            },
            {
              "t": "text",
              "text": " creates DataFrames, and transformations on them build a plan that runs when an action such as "
            },
            {
              "t": "code",
              "text": "show"
            },
            {
              "t": "text",
              "text": " or "
            },
            {
              "t": "code",
              "text": "collect"
            },
            {
              "t": "text",
              "text": " asks for results. Spark SQL queries the same DataFrames, and the pandas API on Spark accepts pandas-style code. The "
            },
            {
              "t": "code",
              "text": "pyspark"
            },
            {
              "t": "text",
              "text": " package bundles Spark's JAR files for local development or for connecting to an existing cluster."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://spark.apache.org/docs/4.3.0/api/python/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F213"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "One engine for SQL and DataFrames"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Spark SQL and the DataFrame API share an execution engine and query the same registered views."
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Cluster setup is separate"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "The package runs Spark locally or connects to an existing cluster. A new standalone cluster needs the full Spark distribution."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/kedro-org/kedro-plugins",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F232"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def save(self, data: DataFrame | pd.DataFrame) -> None:\n    \"\"\"Saves pyspark dataframe.\n\n    Args:\n        data: PySpark DataFrame or Pandas DataFrame to save.\n              Pandas DataFrames will be automatically converted to Spark.\n    \"\"\"\n    import pandas as pd  # noqa: PLC0415\n\n    spark_session = get_spark_with_remote_support()\n\n    # Convert Pandas DataFrame to Spark DataFrame if needed\n    if isinstance(data, pd.DataFrame):\n        data = spark_session.createDataFrame(data)\n\n    save_path = self._get_save_path()\n    spark_save_path = to_spark_path(self._protocol, str(save_path))\n\n    # Create a copy of save_args to avoid mutation\n    save_args = self._save_args.copy()\n\n    # Extract mode and partitionBy (these are handled separately by Spark)\n    mode = save_args.pop(\"mode\", None)\n    partition_by = save_args.pop(\"partitionBy\", None)\n\n    # Prepare writer\n    writer = data.write\n\n    if mode:\n        writer = writer.mode(mode)\n    if partition_by:\n        writer = writer.partitionBy(partition_by)\n\n    # Save with remaining options\n    writer.format(self._file_format).options(**save_args).save(spark_save_path)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/kedro-org/kedro-plugins/blob/f2516d069e6930c5dd3e1598642e736d7e66fa5f/kedro-datasets/kedro_datasets/spark/spark_dataset_v2.py#L258-L292",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F231"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=pyspark%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F213"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from pyspark.sql import SparkSession\n\nspark = SparkSession.builder.getOrCreate()\n\nfrom datetime import datetime, date\nfrom pyspark.sql import Row\n\ndf = spark.createDataFrame([\n    Row(a=1, b=2., c='string1', d=date(2000, 1, 1), e=datetime(2000, 1, 1, 12, 0)),\n    Row(a=2, b=3., c='string2', d=date(2000, 2, 1), e=datetime(2000, 1, 2, 12, 0)),\n    Row(a=4, b=5., c='string3', d=date(2000, 3, 1), e=datetime(2000, 1, 3, 12, 0))\n])\ndf\n\ndf.show()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://spark.apache.org/docs/4.3.0/api/python/getting_started/quickstart_df.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "quickstart_df.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F218"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "dask",
          "name": [
            {
              "t": "fact",
              "fact": "F234"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/dask/dask"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/dask"
            },
            {
              "label": "Docs",
              "href": "https://docs.dask.org/en/stable/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Dask is a parallel computing library that splits pandas dataframes and NumPy arrays into partitions and runs operations on them as a task graph. "
            },
            {
              "t": "code",
              "text": "dd.from_pandas"
            },
            {
              "t": "text",
              "text": " turns a pandas DataFrame into a Dask DataFrame, and calls such as "
            },
            {
              "t": "code",
              "text": "mean()"
            },
            {
              "t": "text",
              "text": " add to the graph without running it until "
            },
            {
              "t": "code",
              "text": "compute()"
            },
            {
              "t": "text",
              "text": ". The same graph runs on threads, on processes, or on a distributed cluster."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.dask.org/en/stable/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F234"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F96"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F97"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F98"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Threads share the interpreter lock"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Python-heavy code runs one thread at a time. The process or distributed scheduler runs that code in parallel."
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Shuffles move data"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Joining or regrouping by a new key moves rows between many partitions."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F251"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/dask/dask-ml",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F250"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _blockwise_slice(arr, idx):\n    \"\"\"Slice an array that is blockwise-aligned with idx.\n\n    Parameters\n    ----------\n    arr : Dask array\n    idx : Dask array\n        Should have the following properties\n\n        * Same blocks as `arr` along the first dimension\n        * Contains only integers\n        * Each block's values should be between ``[0, len(block))``\n\n    Returns\n    -------\n    sliced : dask.Array\n    \"\"\"\n    objs = []\n    offsets = np.hstack([0, np.cumsum(arr.chunks[0])[:-1]])\n\n    for i, (x, idx2) in enumerate(\n        zip(arr.to_delayed().ravel(), idx.to_delayed().ravel())\n    ):\n        idx3 = idx2 - offsets[i]\n        objs.append(x[idx3])\n\n    shapes = idx.chunks[0]\n    if arr.ndim == 2:\n        P = arr.shape[1]\n        shapes = [(x, P) for x in shapes]\n    else:\n        shapes = [(x,) for x in shapes]\n\n    sliced = da.concatenate(\n        [\n            da.from_delayed(x, shape=shape, dtype=arr.dtype)\n            for x, shape in zip(objs, shapes)\n        ]\n    )\n    return sliced\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/dask/dask-ml/blob/fcc8111ac686e086985902f2050b3b17464966dc/dask_ml/model_selection/_split.py#L319-L358",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F249"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20dask%20for%20timestamp%20normalization%2C%20ordered%20row%20indexes%2C%20aligned%20chunk%20selection%20and%20dataframe%20materialization&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F234"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import numpy as np\nimport pandas as pd\nimport dask.dataframe as dd\n\nindex = pd.date_range(\"2021-09-01\", periods=2400, freq=\"1h\")\ndf = pd.DataFrame({\"a\": np.arange(2400), \"b\": list(\"abcaddbe\" * 300)}, index=index)\nddf = dd.from_pandas(df, npartitions=10)\nddf\n\nddf.a.mean()\nddf.a.mean().compute()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.dask.org/en/stable/10-minutes-to-dask.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "Ten minutes to Dask"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F239"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "xarray",
          "name": [
            {
              "t": "fact",
              "fact": "F252"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pydata/xarray"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/xarray"
            },
            {
              "label": "Docs",
              "href": "https://docs.xarray.dev/en/stable/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "xarray adds labels, in the form of named dimensions, coordinates, and attributes, to NumPy-like arrays with any number of dimensions. Operations take dimension names instead of axis positions, as in "
            },
            {
              "t": "code",
              "text": "x.sum('time')"
            },
            {
              "t": "text",
              "text": ", and selection works by label. The data model comes from netCDF files, which xarray reads and writes, and Dask can back the arrays for parallel and out-of-memory work."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.xarray.dev/en/stable/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F252"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Named dimensions"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Code refers to dimensions such as time or latitude by name, independent of axis order."
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Queries without SQL"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Selection runs through Python and pandas expressions. SQL needs a conversion to a dataframe first."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F270"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F271"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/Ouranosinc/xclim",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F270"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def day_to_day_variability(data: xr.DataArray, freq: Freq = \"YS\", subfreq: Freq = \"MS\"):\n    \"\"\"\n    Compute the mean of day-to-day variability.\n\n    Computes the standard deviation of the variable within each sub-period (e.g. month),\n    then averages those standard deviations over the main resampling period (e.g. year).\n    This provides a measure of typical day-to-day variability as described in :cite:t:`kotz_2021`.\n\n    Parameters\n    ----------\n    data : xr.DataArray\n        The input variable.\n    freq : Freq\n        Resampling frequency used to average the sub-period standard deviations. Default: \"YS\".\n    subfreq : Freq\n        Resampling frequency used to compute the standard deviation. Default: \"MS\".\n\n    Returns\n    -------\n    xr.DataArray, [same as data]\n        Mean of the sub-period standard deviations over each period defined by `freq`.\n\n    References\n    ----------\n    :cite:cts:`kotz_2021`\n    \"\"\"\n    if compare_offsets(freq, \"<=\", subfreq):\n        raise ValueError(\"Averaging frequency must be larger than the variability frequency.\")\n    variability = data.resample({\"time\": subfreq}).std(dim=\"time\", keep_attrs=True)\n    out = variability.resample({\"time\": freq}).mean(dim=\"time\", keep_attrs=True)\n    return to_agg_units(out, to_agg_units(variability, data, \"std\"), \"mean\")\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/Ouranosinc/xclim/blob/3621f3cc4ee620a3ffb628be88677859445a6257/src/xclim/compute/generic.py#L1545-L1575",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F269"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=xarray%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F252"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import numpy as np\nimport pandas as pd\nimport xarray as xr\n\ndata = xr.DataArray(np.random.randn(2, 3), dims=(\"x\", \"y\"), coords={\"x\": [10, 20]})\ndata\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.xarray.dev/en/stable/getting-started-guide/quick-overview.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "quick-overview.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F257"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "ibis-framework",
          "name": [
            {
              "t": "fact",
              "fact": "F272"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/ibis-project/ibis"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/ibis-framework"
            },
            {
              "label": "Docs",
              "href": "https://ibis-project.org/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Ibis is a dataframe library that builds lazy expressions and compiles them for a separate backend to run, DuckDB by default. The same API covers more than twenty backends, so code written against a local file can move to a remote database by changing the connection. "
            },
            {
              "t": "code",
              "text": "ibis.connect"
            },
            {
              "t": "text",
              "text": " opens a backend, and "
            },
            {
              "t": "code",
              "text": "Table.sql"
            },
            {
              "t": "text",
              "text": " mixes SQL into a table expression."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F273"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F281"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F275"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F274"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://ibis-project.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F272"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "One API, many backends"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "The same dataframe code runs on DuckDB, Polars, PySpark, Snowflake, BigQuery, PostgreSQL, and other backends."
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Dataframes and SQL together"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Dataframe expressions and SQL strings compose in one query."
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Backend support varies"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Each backend implements its own set of operations and its own SQL dialect."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F290"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F291"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/marimo-team/marimo",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F290"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _get_numeric_bin_values(\n    self, col: ibis.Column, num_bins: int\n) -> ibis.Table:\n    data = self._original_data\n    min_val = col.min().execute()\n    max_val = col.max().execute()\n\n    # Handle case where all values are the same\n    if min_val == max_val:\n        # Create a single bin with all the data\n        total_count = col.count().execute()\n        return ibis.memtable(\n            {\n                \"bin\": [0],\n                \"count\": [total_count],\n                \"bin_start\": [min_val],\n                \"bin_end\": [max_val],\n            }\n        ).execute()\n\n    bin_width = (max_val - min_val) / num_bins\n\n    # Assign bins and count occurrences\n    data = data.mutate(bin=col.histogram(nbins=num_bins))\n    value_counts = data[\"bin\"].value_counts(name=\"count\")\n\n    # Fill in missing bins\n    all_bins = ibis.range(num_bins).unnest().name(\"bin\").as_table()\n    joined = all_bins.left_join(value_counts, \"bin\").mutate(\n        count=ibis.coalesce(value_counts[\"count\"], 0)\n    )\n\n    # Compute bin_start and bin_end for each bin\n    # If the last bin, we use the last value for bin_end, else calculate the bin_end\n    result = joined.mutate(\n        bin_start=min_val + joined[\"bin\"] * bin_width,\n        bin_end=ibis.cases(\n            (joined[\"bin\"] == (num_bins - 1), max_val),\n            else_=min_val + (joined[\"bin\"] + 1) * bin_width,\n        ),\n    ).order_by(\"bin\")\n\n    return result.execute()\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/marimo-team/marimo/blob/24459dbf2a6b630c135dcb3d9c616543874e0f88/marimo/_plugins/ui/_impl/tables/ibis_table.py#L50-L92",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F289"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=ibis-framework%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F272"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import ibis\n\ncon = ibis.connect(\"duckdb://penguins.ddb\")\ncon.create_table(\n    \"penguins\", ibis.examples.penguins.fetch().to_pyarrow(), overwrite=True\n)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://ibis-project.org/tutorials/basics",
                  "label": [
                    {
                      "t": "text",
                      "text": "basics.qmd"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F277"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python data analysis library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#pandas",
          "label": [
            {
              "t": "text",
              "text": "pandas"
            }
          ]
        },
        {
          "t": "text",
          "text": " handles tables that fit in memory, with each operation running as soon as it is called. "
        },
        {
          "t": "link",
          "href": "#polars",
          "label": [
            {
              "t": "text",
              "text": "Polars"
            }
          ]
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "link",
          "href": "#duckdb",
          "label": [
            {
              "t": "text",
              "text": "DuckDB"
            }
          ]
        },
        {
          "t": "text",
          "text": " run larger queries on one machine, Polars through a dataframe API and DuckDB through SQL. "
        },
        {
          "t": "link",
          "href": "#pyspark",
          "label": [
            {
              "t": "text",
              "text": "PySpark"
            }
          ]
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "link",
          "href": "#dask",
          "label": [
            {
              "t": "text",
              "text": "Dask"
            }
          ]
        },
        {
          "t": "text",
          "text": " spread the work across a cluster."
        }
      ]
    },
    {
      "q": "Polars vs pandas: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "pandas runs each operation immediately and keeps the table in memory. Polars can build a lazy query, optimize it, and run it across all CPU cores, and operations that exceed RAM can spill to disk. Polars stores data in the Apache Arrow format, which it shares with other tools without copying."
        }
      ]
    },
    {
      "q": "PySpark vs pandas: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "pandas runs on one machine and holds the data in memory. PySpark sends the work to Spark, which plans transformations and runs them when an action such as "
        },
        {
          "t": "code",
          "text": "show"
        },
        {
          "t": "text",
          "text": " or "
        },
        {
          "t": "code",
          "text": "collect"
        },
        {
          "t": "text",
          "text": " asks for results, on a local machine or a cluster."
        }
      ]
    },
    {
      "q": "What is Ibis in Python?",
      "a": [
        {
          "t": "link",
          "href": "#ibis-framework",
          "label": [
            {
              "t": "text",
              "text": "Ibis"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a dataframe library that builds lazy expressions and runs them on a separate backend, DuckDB by default. The same code runs on more than twenty backends, so moving from a laptop to a remote database means changing the connection."
        }
      ]
    },
    {
      "q": "DuckDB vs Polars: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "Both run analytical queries inside the Python process and can handle data larger than memory. DuckDB is a SQL database that queries pandas and Arrow data directly, while Polars centers on a dataframe expression API and also accepts SQL."
        }
      ]
    },
    {
      "q": "Dask vs Spark: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "Dask splits pandas dataframes and NumPy arrays into partitions and schedules them from Python, on one machine or a cluster. Spark is a separate engine that PySpark drives, with DataFrames and SQL sharing one planner."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, pandas",
      "display": "pandas",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, pandas",
      "display": "688.5M",
      "asOf": "2026-11-16"
    },
    "F3": {
      "label": "License, pandas",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, pandas",
      "display": "3.1.1, Nov 2026",
      "asOf": "2026-11-04"
    },
    "F5": {
      "label": "Package release date, pandas",
      "display": "Nov 2026",
      "asOf": "2026-11-04"
    },
    "F6": {
      "label": "Repository stars, pandas",
      "display": "49.6K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "SQL over tables, pandas",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Parallel execution, pandas",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Out-of-core processing, pandas",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Output formats, pandas",
      "display": "CSV",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, pandas",
      "display": "pip install pandas",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, pandas",
      "display": "Organizes mixed-type data in dataframe columns.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, pandas",
      "display": "Stores mixed-type table columns",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, pandas",
      "display": "Organize named columns containing text, numbers, and other supported data types.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, pandas",
      "display": "Processes suitable workloads in chunks",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, pandas",
      "display": "Split supported workflows into chunks that each fit in memory.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, pandas",
      "display": "Large workflows need memory planning",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, pandas",
      "display": "Use chunked workflows or another engine when data exceeds available memory.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, pandas",
      "display": "Parallel column work needs numba",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, pandas",
      "display": "Install numba for supported parallel column-wise computations.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, pandas",
      "display": "import pandas as pd\n\ndf = pd.DataFrame(\n    {\n        \"Name\": [\n            \"Braund, Mr. Owen Harris\",\n            \"Allen, Mr. William Henry\",\n            \"Bonnell, Miss Elizabeth\",\n        ],\n        \"Age\": [22, 35, 58],\n        \"Sex\": [\"male\", \"male\", \"female\"],\n    }\n)\n\ndf\n\ndf[\"Age\"].max()\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Quickstart source reference, pandas",
      "display": "01_table_oriented.html",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function, pandas",
      "display": "def ohlcv_to_dataframe(\n    ohlcv: list,\n    timeframe: str,\n    pair: str,\n    *,\n    fill_missing: bool = True,\n    drop_incomplete: bool = True,\n    candle_type: CandleType = CandleType.SPOT,\n) -> DataFrame:\n    # ...\n    logger.debug(f\"Converting candle (OHLCV) data to dataframe for pair {pair}.\")\n    df = DataFrame(ohlcv, columns=get_candle_columns(candle_type))\n\n    # Floor date to seconds to account for exchange imprecisions\n    from freqtrade.exchange import timeframe_to_floor_freq\n\n    resample_interval = timeframe_to_floor_freq(timeframe)\n\n    df[\"date\"] = (\n        to_datetime(df[\"date\"], unit=\"ms\", utc=True).dt.as_unit(\"ms\").dt.floor(resample_interval)\n    )\n\n    # Some exchanges return int values for Volume and even for OHLC.\n    # Convert them since TA-LIB indicators used in the strategy assume floats\n    # and fail with exception...\n    df = df.astype(dtype=get_candle_dtypes(candle_type))\n    return clean_ohlcv_dataframe(\n        df,\n        timeframe,\n        pair,\n        fill_missing=fill_missing,\n        drop_incomplete=drop_incomplete,\n        candle_type=candle_type,\n    )\n",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project function reference, pandas",
      "display": "converter.py · ohlcv_to_dataframe()",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project repository, pandas",
      "display": "freqtrade/freqtrade",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project stars, freqtrade/freqtrade",
      "display": "56.9K",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Project push date, freqtrade/freqtrade",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F28": {
      "label": "Library name, duckdb",
      "display": "DuckDB",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Monthly downloads, duckdb",
      "display": "76.1M",
      "asOf": "2026-11-16"
    },
    "F30": {
      "label": "License, duckdb",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Package release, duckdb",
      "display": "2.0.0, Oct 2026",
      "asOf": "2026-10-21"
    },
    "F32": {
      "label": "Package release date, duckdb",
      "display": "Oct 2026",
      "asOf": "2026-10-21"
    },
    "F33": {
      "label": "Repository stars, duckdb",
      "display": "206",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Lazy execution, duckdb",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "SQL over tables, duckdb",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Parallel execution, duckdb",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Out-of-core processing, duckdb",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "Output formats, duckdb",
      "display": "CSV, JSON",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "Install, duckdb",
      "display": "pip install duckdb",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "What it does, duckdb",
      "display": "Queries Python pandas dataframes as SQL tables.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths lead, duckdb",
      "display": "Queries pandas dataframes directly",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths, duckdb",
      "display": "Run SQL against pandas DataFrames without importing them into database tables.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "strengths lead, duckdb",
      "display": "Spills larger workloads to disk",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "strengths, duckdb",
      "display": "Process eligible larger-than-memory queries using temporary disk storage.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations lead, duckdb",
      "display": "Some aggregates cannot spill",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "limitations, duckdb",
      "display": "Keep non-spillable aggregate states within available memory.",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "limitations lead, duckdb",
      "display": "Read-only queries rerun on access",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "limitations, duckdb",
      "display": "Materialize reusable results instead of repeatedly reading the same lazy relation.",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Quickstart, duckdb",
      "display": "import duckdb\n\nr1 = duckdb.sql(\"SELECT 42 AS i\")\nduckdb.sql(\"SELECT i * 2 AS k FROM r1\").show()\n\n",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project function, duckdb",
      "display": "def load_source(self, plugin_name: str, source_config: utils.SourceConfig):\n    if plugin_name not in self._plugins:\n        raise Exception(\n            f\"Plugin {plugin_name} not found; known plugins are: \"\n            + \",\".join(self._plugins.keys())\n        )\n    plugin = self._plugins[plugin_name]\n    handle = self.handle()\n    cursor = handle.cursor()\n\n    if source_config.schema:\n        cursor.execute(f\"CREATE SCHEMA IF NOT EXISTS {source_config.schema}\")\n\n    save_mode = source_config.get(\"save_mode\", \"overwrite\")\n    if save_mode in (\"ignore\", \"error_if_exists\"):\n        params = [source_config.schema, source_config.identifier]\n        q = \"\"\"SELECT COUNT(1)\n            FROM system.information_schema.tables\n            WHERE table_schema = ?\n            AND table_name = ?\n            \"\"\"\n        if source_config.database:\n            q += \"AND table_catalog = ?\"\n            params.append(source_config.database)\n        # fetchall() drains the result; DuckDB 2.0 rejects register() on a cursor\n        # whose result was only partially fetched.\n        if cursor.execute(q, params).fetchall()[0][0]:\n            if save_mode == \"error_if_exists\":\n                raise Exception(f\"Source {source_config.table_name()} already exists!\")\n            else:\n                # Nothing to do (we ignore the existing table)\n                return\n    df = plugin.load(source_config)\n    assert df is not None\n\n    materialization = source_config.meta.get(\n        \"materialization\", plugin.default_materialization()\n    )\n    source_table_name = source_config.table_name()\n    df_name = source_table_name.replace(\".\", \"_\") + \"_df\"\n\n    cursor.register(df_name, df)\n\n    if materialization == \"view\":\n        # save to df instance to register on each cursor creation\n        self._REGISTERED_DF[df_name] = df\n\n    cursor.execute(\n        f\"CREATE OR REPLACE {materialization} {source_table_name} AS SELECT * FROM {df_name}\"\n    )\n\n    cursor.close()\n    handle.close()\n",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project function reference, duckdb",
      "display": "local.py · load_source()",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Project repository, duckdb",
      "display": "duckdb/dbt-duckdb",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "Project stars, duckdb/dbt-duckdb",
      "display": "1.4K",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Project push date, duckdb/dbt-duckdb",
      "display": "Nov 2026",
      "asOf": "2026-11-14"
    },
    "F55": {
      "label": "Library name, polars",
      "display": "Polars",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Monthly downloads, polars",
      "display": "65.3M",
      "asOf": "2026-11-16"
    },
    "F57": {
      "label": "License, polars",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Package release, polars",
      "display": "2.1.0, Oct 2026",
      "asOf": "2026-10-25"
    },
    "F59": {
      "label": "Package release date, polars",
      "display": "Oct 2026",
      "asOf": "2026-10-25"
    },
    "F60": {
      "label": "Repository stars, polars",
      "display": "40.3K",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Lazy execution, polars",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "SQL over tables, polars",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "Parallel execution, polars",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "Out-of-core processing, polars",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "Output formats, polars",
      "display": "CSV, JSON",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "Install, polars",
      "display": "pip install polars",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "What it does, polars",
      "display": "Transforms dataframe columns through modular expression APIs.",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "strengths lead, polars",
      "display": "Defers work until collection",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "strengths, polars",
      "display": "Build a lazy plan, then execute it when collecting the result.",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "strengths lead, polars",
      "display": "Parallelizes native dataframe expressions",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "strengths, polars",
      "display": "Run eligible expressions and grouped computations across CPU threads.",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "limitations lead, polars",
      "display": "Streaming has in-memory fallbacks",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "limitations, polars",
      "display": "Unsupported streaming operations fall back to the in-memory engine.",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "limitations lead, polars",
      "display": "New features reach expressions first",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "limitations, polars",
      "display": "Use the expression API when newer functionality has not reached the SQL interface.",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Quickstart, polars",
      "display": "import polars as pl\nimport datetime as dt\n\ndf = pl.DataFrame(\n    {\n        \"name\": [\"Alice Archer\", \"Ben Brown\", \"Chloe Cooper\", \"Daniel Donovan\"],\n        \"birthdate\": [\n            dt.date(1997, 1, 10),\n            dt.date(1985, 2, 15),\n            dt.date(1983, 3, 22),\n            dt.date(1981, 4, 30),\n        ],\n        \"weight\": [57.9, 72.5, 53.6, 83.1],  # (kg)\n        \"height\": [1.56, 1.77, 1.65, 1.75],  # (m)\n    }\n)\n\nprint(df)\n\n\nresult = df.select(\n    pl.col(\"name\"),\n    pl.col(\"birthdate\").dt.year().alias(\"birth_year\"),\n    (pl.col(\"weight\") / (pl.col(\"height\") ** 2)).alias(\"bmi\"),\n)\nprint(result)\n\n",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Project function, polars",
      "display": "def with_row_index(self, name: str, order_by: Sequence[str] | None) -> Self:\n    frame = self.native\n    if order_by is None:\n        result = frame.with_row_index(name)\n    else:\n        if self._backend_version < (1, 10):\n            msg = \"Cannot pass `order_by` to `with_row_index` for Polars<1.10\"\n            raise NotImplementedError(msg)\n        result = frame.select(\n            pl.int_range(pl.len()).over(order_by=order_by).alias(name), pl.all()\n        )\n\n    return self._with_native(result)\n",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Project function reference, polars",
      "display": "dataframe.py · with_row_index()",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Project repository, polars",
      "display": "narwhals-dev/narwhals",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Project stars, narwhals-dev/narwhals",
      "display": "1.8K",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Project push date, narwhals-dev/narwhals",
      "display": "Nov 2026",
      "asOf": "2026-11-14"
    },
    "F82": {
      "label": "Library name, dask",
      "display": "Dask",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Monthly downloads, dask",
      "display": "30.9M",
      "asOf": "2026-11-16"
    },
    "F84": {
      "label": "License, dask",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Package release, dask",
      "display": "2026.8.0, Aug 2026",
      "asOf": "2026-08-24"
    },
    "F86": {
      "label": "Package release date, dask",
      "display": "Aug 2026",
      "asOf": "2026-08-24"
    },
    "F87": {
      "label": "Repository stars, dask",
      "display": "14.0K",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "Lazy execution, dask",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "SQL over tables, dask",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "Parallel execution, dask",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "Out-of-core processing, dask",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "Output formats, dask",
      "display": "CSV",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "Install, dask",
      "display": "python -m pip install \"dask[dataframe]\"",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "What it does, dask",
      "display": "Coordinates partitioned pandas dataframes for parallel and larger-than-memory analysis.",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "strengths lead, dask",
      "display": "Partitions familiar pandas dataframes",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "strengths, dask",
      "display": "Process tabular data through coordinated pandas partitions.",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "strengths lead, dask",
      "display": "Scales across a computer cluster",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "strengths, dask",
      "display": "Run partitioned analysis on one machine or a distributed cluster.",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "limitations lead, dask",
      "display": "Python-heavy work limits threaded parallelism",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "limitations, dask",
      "display": "Use an appropriate process scheduler for work that cannot release the interpreter lock.",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "limitations lead, dask",
      "display": "Shuffles add cross-partition traffic",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "limitations, dask",
      "display": "Repartitioning by a new key can move data between many partitions.",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Quickstart, dask",
      "display": "import numpy as np\nimport pandas as pd\nimport dask.dataframe as dd\nimport dask.array as da\nimport dask.bag as db\n\nindex = pd.date_range(\"2021-09-01\", periods=2400, freq=\"1h\")\ndf = pd.DataFrame({\"a\": np.arange(2400), \"b\": list(\"abcaddbe\" * 300)}, index=index)\nddf = dd.from_pandas(df, npartitions=10)\nddf\n\nddf.a.mean()\nddf.a.mean().compute()\nddf.b.unique()\nddf.b.unique().compute()\n",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Quickstart source reference, dask",
      "display": "10-minutes-to-dask.html",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Project function, dask",
      "display": "def _blockwise_slice(arr, idx):\n    # ...\n    objs = []\n    offsets = np.hstack([0, np.cumsum(arr.chunks[0])[:-1]])\n\n    for i, (x, idx2) in enumerate(\n        zip(arr.to_delayed().ravel(), idx.to_delayed().ravel())\n    ):\n        idx3 = idx2 - offsets[i]\n        objs.append(x[idx3])\n\n    shapes = idx.chunks[0]\n    if arr.ndim == 2:\n        P = arr.shape[1]\n        shapes = [(x, P) for x in shapes]\n    else:\n        shapes = [(x,) for x in shapes]\n\n    sliced = da.concatenate(\n        [\n            da.from_delayed(x, shape=shape, dtype=arr.dtype)\n            for x, shape in zip(objs, shapes)\n        ]\n    )\n    return sliced\n",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Project function reference, dask",
      "display": "_split.py · _blockwise_slice()",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Project repository, dask",
      "display": "dask/dask-ml",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Project stars, dask/dask-ml",
      "display": "951",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Project push date, dask/dask-ml",
      "display": "Sep 2025",
      "asOf": "2025-09-27"
    },
    "F110": {
      "label": "Developer need",
      "display": "Labeled mixed-type tables",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Why choose pandas",
      "display": "mixed-type dataframe columns",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Developer need in introduction",
      "display": "labeled mixed-type tables",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "Developer need",
      "display": "Lazy dataframe transformations",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "Why choose polars",
      "display": "deferred expression execution",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "Developer need in introduction",
      "display": "lazy dataframe transformations",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "When to consider dask",
      "display": "partitioned analysis should extend to a distributed cluster",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "Developer need",
      "display": "Partitioned analysis across machines",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "Why choose dask",
      "display": "local or clustered partition execution",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "Developer need in introduction",
      "display": "partitioned analysis across machines",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "Developer need",
      "display": "SQL over existing pandas data",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "Why choose duckdb",
      "display": "direct dataframe scans from SQL",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "Developer need in introduction",
      "display": "SQL over existing pandas data",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "When to consider polars",
      "display": "dataframe expressions fit better than SQL queries",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "Page introduction",
      "display": "Python data analysis libraries let developers explore, transform, and analyze datasets.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: What is the best Python library for data analysis?",
      "display": "pandas organizes mixed-type data in labeled columns.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: What is the best Python library for data analysis?",
      "display": "Polars offers eager and lazy expression-based execution.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: What is the best Python library for data analysis?",
      "display": "Dask coordinates pandas partitions locally or across a cluster.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "FAQ: What is the best Python library for data analysis?",
      "display": "DuckDB runs SQL directly against local pandas dataframes.",
      "asOf": "2026-11-17"
    },
    "F129": {
      "label": "FAQ: Can pandas process data that is larger than RAM?",
      "display": "Some workloads can be split into chunks that fit in memory; this is a manual workflow rather than a general spilling query engine.",
      "asOf": "2026-11-17"
    },
    "F130": {
      "label": "FAQ: Does Polars streaming guarantee every operation stays out of memory?",
      "display": "Some operations are non-streaming or lack streaming implementations, so Polars falls back to the in-memory engine for them.",
      "asOf": "2026-11-17"
    },
    "F131": {
      "label": "FAQ: Can I use SQL with pandas, Polars and Dask?",
      "display": "DuckDB queries pandas dataframes through replacement scans.",
      "asOf": "2026-11-17"
    },
    "F132": {
      "label": "FAQ: Can I use SQL with pandas, Polars and Dask?",
      "display": "Polars translates SQL into its own expressions.",
      "asOf": "2026-11-17"
    },
    "F133": {
      "label": "FAQ: Can I use SQL with pandas, Polars and Dask?",
      "display": "Dask points to the separate dask-sql query engine.",
      "asOf": "2026-11-17"
    },
    "F134": {
      "label": "FAQ: Does pandas automatically run every operation across CPU cores?",
      "display": "Supported parallel column-wise workflows use the additional numba engine; this does not establish universal parallel dataframe execution.",
      "asOf": "2026-11-17"
    },
    "F135": {
      "label": "FAQ: Why does a Dask join or reindex become expensive?",
      "display": "Shuffling a dataset to a new key can require partitions to exchange data with each other.",
      "asOf": "2026-11-17"
    },
    "F136": {
      "label": "FAQ: Can DuckDB still run out of memory when it spills to disk?",
      "display": "Some aggregate functions do not offload their intermediate state to disk; queries with multiple blocking operators can also exhaust memory.",
      "asOf": "2026-11-17"
    },
    "F137": {
      "label": "FAQ: Does fetching a DuckDB relation reuse the previous result?",
      "display": "A read-only relation executes when fetched or displayed, and reading it again runs the query again.",
      "asOf": "2026-11-17"
    },
    "F138": {
      "label": "Library name, pandas",
      "display": "pandas",
      "asOf": "2026-11-19"
    },
    "F139": {
      "label": "Monthly downloads, pandas",
      "display": "706.0M",
      "asOf": "2026-11-19"
    },
    "F140": {
      "label": "License, pandas",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-19"
    },
    "F141": {
      "label": "Package release, pandas",
      "display": "3.1.1",
      "asOf": "2026-11-19"
    },
    "F142": {
      "label": "Package release date, pandas",
      "display": "Nov 2026",
      "asOf": "2026-11-19"
    },
    "F143": {
      "label": "Install, pandas",
      "display": "pip install pandas",
      "asOf": "2026-11-19"
    },
    "F144": {
      "label": "Quickstart, pandas",
      "display": "import pandas as pd\n\nd = {\"col1\": [1, 2], \"col2\": [3, 4]}\ndf = pd.DataFrame(data=d)\nprint(df)\n",
      "asOf": "2026-11-19"
    },
    "F145": {
      "label": "Repository stars, pandas",
      "display": "49.6K",
      "asOf": "2026-11-19"
    },
    "F146": {
      "label": "Deferred execution, pandas",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F147": {
      "label": "SQL over frames, pandas",
      "display": "Via plugin",
      "asOf": "2026-11-19"
    },
    "F148": {
      "label": "Data model and execution role, pandas",
      "display": "Indexed two-dimensional in-memory table analysis with Series/DataFrame APIs.",
      "asOf": "2026-11-19"
    },
    "F149": {
      "label": "Python requirement, pandas",
      "display": ">=3.11",
      "asOf": "2026-11-19"
    },
    "F150": {
      "label": "First-call prerequisites, pandas",
      "display": "[\"API-constructor first-call recipe: exact official dict fixture and DataFrame call; customary import from the retained source and print to display the created frame are disclosed setup. Install uses exact published distribution.\"]",
      "asOf": "2026-11-19"
    },
    "F151": {
      "label": "Application integration constraints, pandas",
      "display": "Freqtrade imports pandas.DataFrame and supplies OHLCV numeric columns plus a datetime-like date column. Current resample accepts rule and on=\"date\"; aggregate accepts dict column-name to string-function mapping (first/max/min/last/sum). ffill propagates the previous close; fillna accepts a dictionary of aligned Series for open/high/low, then reset_index restores date as a column. Actual frequency helper uses valid current 300s/1W-MON/1MS/1YS forms for common 5m/1w/1M/1y inputs. Scope is those valid supported candle intervals, not arbitrary timeframe strings; multi-year suffixes and multi-week normalization must not be generalized. Non-OHLCV candle types bypass resampling.",
      "asOf": "2026-11-19"
    },
    "F152": {
      "label": "Project function, pandas",
      "display": "def ohlcv_fill_up_missing_data(\n    dataframe: DataFrame,\n    timeframe: str,\n    pair: str,\n    candle_type: CandleType = CandleType.SPOT,\n) -> DataFrame:\n    \"\"\"\n    Fills up missing data with 0 volume rows,\n    using the previous close as price for \"open\", \"high\", \"low\" and \"close\", volume is set to 0\n\n    Candle types that carry a single value (e.g. funding rates) have no candle to fabricate -\n    inventing one would silently make up rates - so they are returned unchanged.\n    \"\"\"\n    if not candle_type_is_ohlcv(candle_type):\n        logger.debug(f\"Skipping fillup for {pair}, {timeframe} - not applicable to {candle_type}.\")\n        return dataframe\n\n    from freqtrade.exchange import timeframe_to_resample_freq\n\n    ohlcv_dict = {\"open\": \"first\", \"high\": \"max\", \"low\": \"min\", \"close\": \"last\", \"volume\": \"sum\"}\n    resample_interval = timeframe_to_resample_freq(timeframe)\n    # Resample to create \"NAN\" values\n    df = dataframe.resample(resample_interval, on=\"date\").agg(ohlcv_dict)\n\n    # Forwardfill close for missing columns\n    df[\"close\"] = df[\"close\"].ffill()\n    # Use close for \"open, high, low\"\n    df.loc[:, [\"open\", \"high\", \"low\"]] = df[[\"open\", \"high\", \"low\"]].fillna(\n        value={\n            \"open\": df[\"close\"],\n            \"high\": df[\"close\"],\n            \"low\": df[\"close\"],\n        }\n    )\n    df = df.reset_index()\n    len_before = len(dataframe)\n    len_after = len(df)\n    pct_missing = (len_after - len_before) / len_before if len_before > 0 else 0\n    if len_before != len_after:\n        message = (\n            f\"Missing data fillup for {pair}, {timeframe}: \"\n            f\"before: {len_before} - after: {len_after} - {pct_missing:.2%}\"\n        )\n        if pct_missing > 0.01:\n            logger.info(message)\n        else:\n            # Don't be verbose if only a small amount is missing\n            logger.debug(message)\n    return df\n",
      "asOf": "2026-11-19"
    },
    "F153": {
      "label": "Project source file, pandas",
      "display": "freqtrade/data/converter/converter.py",
      "asOf": "2026-11-19"
    },
    "F154": {
      "label": "Project full_name, pandas",
      "display": "freqtrade/freqtrade",
      "asOf": "2026-11-19"
    },
    "F155": {
      "label": "Project stargazers_count, pandas",
      "display": "56.9K",
      "asOf": "2026-11-19"
    },
    "F156": {
      "label": "Library name, pyarrow",
      "display": "pyarrow",
      "asOf": "2026-11-19"
    },
    "F157": {
      "label": "Monthly downloads, pyarrow",
      "display": "435.9M",
      "asOf": "2026-11-19"
    },
    "F158": {
      "label": "License, pyarrow",
      "display": "Apache-2.0",
      "asOf": "2026-11-19"
    },
    "F159": {
      "label": "Package release, pyarrow",
      "display": "26.0.1",
      "asOf": "2026-11-19"
    },
    "F160": {
      "label": "Package release date, pyarrow",
      "display": "Nov 2026",
      "asOf": "2026-11-19"
    },
    "F161": {
      "label": "Install, pyarrow",
      "display": "pip install pyarrow",
      "asOf": "2026-11-19"
    },
    "F162": {
      "label": "Quickstart, pyarrow",
      "display": "import pyarrow as pa\nn_legs = pa.array([2, 4, 5, 100])\nanimals = pa.array([\"Flamingo\", \"Horse\", \"Brittle stars\", \"Centipede\"])\nnames = [\"n_legs\", \"animals\"]\npa.table({\"n_legs\": n_legs, \"animals\": animals})\n",
      "asOf": "2026-11-19"
    },
    "F163": {
      "label": "Official description, pyarrow",
      "display": "Python library for Apache Arrow",
      "asOf": "2026-11-19"
    },
    "F164": {
      "label": "Quickstart source file, pyarrow",
      "display": "pyarrow.table.html",
      "asOf": "2026-11-19"
    },
    "F165": {
      "label": "Repository stars, pyarrow",
      "display": "17.3K",
      "asOf": "2026-11-19"
    },
    "F166": {
      "label": "Deferred execution, pyarrow",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F167": {
      "label": "SQL over frames, pyarrow",
      "display": "Via plugin",
      "asOf": "2026-11-19"
    },
    "F168": {
      "label": "Data model and execution role, pyarrow",
      "display": "Typed columnar tables, record batches, datasets, and Arrow memory/interchange primitives.",
      "asOf": "2026-11-19"
    },
    "F169": {
      "label": "Python requirement, pyarrow",
      "display": ">=3.11",
      "asOf": "2026-11-19"
    },
    "F170": {
      "label": "First-call prerequisites, pyarrow",
      "display": "[\"Official factory example through first table creation. Bundled literal demo data; no pandas or external file. Install uses exact published pyarrow distribution.\"]",
      "asOf": "2026-11-19"
    },
    "F171": {
      "label": "Application integration constraints, pyarrow",
      "display": "Hugging Face imports pyarrow as pa. The input can be its Table wrapper; its to_reader forwards max_chunksize to the underlying Arrow Table, so wrapper calls are not inflated as independent native APIs. Current native Table.to_reader accepts max_chunksize and yields RecordBatch chunks. Positive batch_size bounds chunk rows; chunks share a schema. from_batches accepts the buffered RecordBatch list; RecordBatch.slice accepts offset and length including overflow residual slices.",
      "asOf": "2026-11-19"
    },
    "F172": {
      "label": "Repository/download proxy scope, pyarrow",
      "display": "Repository stars and distribution downloads cover more than Python DataFrame analysis alone.",
      "asOf": "2026-11-19"
    },
    "F173": {
      "label": "Project function, pyarrow",
      "display": "def table_iter(table: Table, batch_size: int, drop_last_batch=False) -> Iterator[pa.Table]:\n    \"\"\"Iterate over sub-tables of size `batch_size`.\n\n    Args:\n        table (`pyarrow.Table`):\n            PyArrow table to iterate over.\n        batch_size (`int`):\n            Size of each sub-table to yield.\n        drop_last_batch (`bool`, defaults to `False`):\n            Drop the last batch if it is smaller than `batch_size`.\n    \"\"\"\n    chunks_buffer = []\n    chunks_buffer_size = 0\n    for chunk in table.to_reader(max_chunksize=batch_size):\n        if len(chunk) == 0:\n            continue\n        elif chunks_buffer_size + len(chunk) < batch_size:\n            chunks_buffer.append(chunk)\n            chunks_buffer_size += len(chunk)\n            continue\n        elif chunks_buffer_size + len(chunk) == batch_size:\n            chunks_buffer.append(chunk)\n            yield pa.Table.from_batches(chunks_buffer)\n            chunks_buffer = []\n            chunks_buffer_size = 0\n        else:\n            cropped_chunk_length = batch_size - chunks_buffer_size\n            chunks_buffer.append(chunk.slice(0, cropped_chunk_length))\n            yield pa.Table.from_batches(chunks_buffer)\n            chunks_buffer = [chunk.slice(cropped_chunk_length, len(chunk) - cropped_chunk_length)]\n            chunks_buffer_size = len(chunk) - cropped_chunk_length\n    if not drop_last_batch and chunks_buffer:\n        yield pa.Table.from_batches(chunks_buffer)\n",
      "asOf": "2026-11-19"
    },
    "F174": {
      "label": "Project source file, pyarrow",
      "display": "src/datasets/table.py",
      "asOf": "2026-11-19"
    },
    "F175": {
      "label": "Project full_name, pyarrow",
      "display": "huggingface/datasets",
      "asOf": "2026-11-19"
    },
    "F176": {
      "label": "Project stargazers_count, pyarrow",
      "display": "22.2K",
      "asOf": "2026-11-19"
    },
    "F177": {
      "label": "Library name, duckdb",
      "display": "DuckDB",
      "asOf": "2026-11-19"
    },
    "F178": {
      "label": "Monthly downloads, duckdb",
      "display": "80.0M",
      "asOf": "2026-11-19"
    },
    "F179": {
      "label": "License, duckdb",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F180": {
      "label": "Package release, duckdb",
      "display": "2.0.0",
      "asOf": "2026-11-19"
    },
    "F181": {
      "label": "Package release date, duckdb",
      "display": "Oct 2026",
      "asOf": "2026-11-19"
    },
    "F182": {
      "label": "Install, duckdb",
      "display": "pip install duckdb",
      "asOf": "2026-11-19"
    },
    "F183": {
      "label": "Quickstart, duckdb",
      "display": "import duckdb\n\nduckdb.sql(\"SELECT 42\").show()\n",
      "asOf": "2026-11-19"
    },
    "F184": {
      "label": "Repository stars, duckdb",
      "display": "207",
      "asOf": "2026-11-19"
    },
    "F185": {
      "label": "Deferred execution, duckdb",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F186": {
      "label": "SQL over frames, duckdb",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F187": {
      "label": "Data model and execution role, duckdb",
      "display": "Embedded analytical SQL database with a lazy relational Python interface.",
      "asOf": "2026-11-19"
    },
    "F188": {
      "label": "Python requirement, duckdb",
      "display": ">=3.11.0",
      "asOf": "2026-11-19"
    },
    "F189": {
      "label": "First-call prerequisites, duckdb",
      "display": "[\"Official shortest first query; module-level in-memory connection.\"]",
      "asOf": "2026-11-19"
    },
    "F190": {
      "label": "Application integration constraints, duckdb",
      "display": "The retained LocalEnvironment creates native DuckDB connections/cursors and wraps them in DuckDBConnectionWrapper/DuckDBCursorWrapper. Wrapper execute forwards SQL and optional bindings to the native connection and returns its native result; __getattr__ forwards register and fetchall. Metadata query uses a positional list matching parameter placeholders, and fetchall drains it before register (required by DuckDB2). plugin.load must return a supported frame/table object. SQL identifiers/materialization come from trusted dbt SourceConfig, not parameterized arbitrary user text; this is not a generic SQL-injection-safe helper. Schema must be configured for the intended existing-source lookup.",
      "asOf": "2026-11-19"
    },
    "F191": {
      "label": "Project function, duckdb",
      "display": "def load_source(self, plugin_name: str, source_config: utils.SourceConfig):\n    if plugin_name not in self._plugins:\n        raise Exception(\n            f\"Plugin {plugin_name} not found; known plugins are: \"\n            + \",\".join(self._plugins.keys())\n        )\n    plugin = self._plugins[plugin_name]\n    handle = self.handle()\n    cursor = handle.cursor()\n\n    if source_config.schema:\n        cursor.execute(f\"CREATE SCHEMA IF NOT EXISTS {source_config.schema}\")\n\n    save_mode = source_config.get(\"save_mode\", \"overwrite\")\n    if save_mode in (\"ignore\", \"error_if_exists\"):\n        params = [source_config.schema, source_config.identifier]\n        q = \"\"\"SELECT COUNT(1)\n            FROM system.information_schema.tables\n            WHERE table_schema = ?\n            AND table_name = ?\n            \"\"\"\n        if source_config.database:\n            q += \"AND table_catalog = ?\"\n            params.append(source_config.database)\n        # fetchall() drains the result; DuckDB 2.0 rejects register() on a cursor\n        # whose result was only partially fetched.\n        if cursor.execute(q, params).fetchall()[0][0]:\n            if save_mode == \"error_if_exists\":\n                raise Exception(f\"Source {source_config.table_name()} already exists!\")\n            else:\n                # Nothing to do (we ignore the existing table)\n                return\n    df = plugin.load(source_config)\n    assert df is not None\n\n    materialization = source_config.meta.get(\n        \"materialization\", plugin.default_materialization()\n    )\n    source_table_name = source_config.table_name()\n    df_name = source_table_name.replace(\".\", \"_\") + \"_df\"\n\n    cursor.register(df_name, df)\n\n    if materialization == \"view\":\n        # save to df instance to register on each cursor creation\n        self._REGISTERED_DF[df_name] = df\n\n    cursor.execute(\n        f\"CREATE OR REPLACE {materialization} {source_table_name} AS SELECT * FROM {df_name}\"\n    )\n\n    cursor.close()\n    handle.close()\n",
      "asOf": "2026-11-19"
    },
    "F192": {
      "label": "Project source file, duckdb",
      "display": "dbt/adapters/duckdb/environments/local.py",
      "asOf": "2026-11-19"
    },
    "F193": {
      "label": "Project full_name, duckdb",
      "display": "duckdb/dbt-duckdb",
      "asOf": "2026-11-19"
    },
    "F194": {
      "label": "Project stargazers_count, duckdb",
      "display": "1.4K",
      "asOf": "2026-11-19"
    },
    "F195": {
      "label": "Library name, polars",
      "display": "Polars",
      "asOf": "2026-11-19"
    },
    "F196": {
      "label": "Monthly downloads, polars",
      "display": "68.0M",
      "asOf": "2026-11-19"
    },
    "F197": {
      "label": "License, polars",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F198": {
      "label": "Package release, polars",
      "display": "2.1.0",
      "asOf": "2026-11-19"
    },
    "F199": {
      "label": "Package release date, polars",
      "display": "Oct 2026",
      "asOf": "2026-11-19"
    },
    "F200": {
      "label": "Install, polars",
      "display": "pip install polars",
      "asOf": "2026-11-19"
    },
    "F201": {
      "label": "Quickstart, polars",
      "display": "import polars as pl\nimport datetime as dt\n\ndf = pl.DataFrame(\n    {\n        \"name\": [\"Alice Archer\", \"Ben Brown\", \"Chloe Cooper\", \"Daniel Donovan\"],\n        \"birthdate\": [\n            dt.date(1997, 1, 10),\n            dt.date(1985, 2, 15),\n            dt.date(1983, 3, 22),\n            dt.date(1981, 4, 30),\n        ],\n        \"weight\": [57.9, 72.5, 53.6, 83.1],  # (kg)\n        \"height\": [1.56, 1.77, 1.65, 1.75],  # (m)\n    }\n)\n\nprint(df)\n",
      "asOf": "2026-11-19"
    },
    "F202": {
      "label": "Repository stars, polars",
      "display": "40.4K",
      "asOf": "2026-11-19"
    },
    "F203": {
      "label": "Deferred execution, polars",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F204": {
      "label": "SQL over frames, polars",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F205": {
      "label": "Data model and execution role, polars",
      "display": "Typed DataFrame expressions with both eager and lazy execution modes.",
      "asOf": "2026-11-19"
    },
    "F206": {
      "label": "Python requirement, polars",
      "display": ">=3.11",
      "asOf": "2026-11-19"
    },
    "F207": {
      "label": "First-call prerequisites, polars",
      "display": "[\"Official first frame creation and display; later transformation/query sections excluded.\"]",
      "asOf": "2026-11-19"
    },
    "F208": {
      "label": "Application integration constraints, polars",
      "display": "Narwhals imports polars as pl. Converts its own dtype specifications into native Polars types, preserving None for auto-inference. Current from_dicts accepts schema as its second positional argument; a schema dict value of None is explicitly auto-inferred. Empty input uses DataFrame(schema=...), while the older Mapping compatibility branch supplies a generator of row tuples with schema and orient=\"row\", all accepted by the current DataFrame constructor. Narwhals context and dtype conversion helpers are host prerequisites, not Polars calls.",
      "asOf": "2026-11-19"
    },
    "F209": {
      "label": "Project function, polars",
      "display": "@classmethod\ndef from_dicts(\n    cls,\n    data: Sequence[Mapping[str, Any]],\n    /,\n    *,\n    context: _LimitedContext,\n    schema: Mapping[str, IntoDType | None] | None,\n) -> Self:\n    pl_schema = (\n        {\n            key: narwhals_to_native_dtype(dtype, context._version)\n            if dtype is not None\n            else None\n            for (key, dtype) in schema.items()\n        }\n        if schema\n        else None\n    )\n    if not data:\n        native = pl.DataFrame(schema=pl_schema)\n    elif FROM_DICTS_ACCEPTS_MAPPINGS or isinstance(data[0], dict):\n        native = pl.from_dicts(data, pl_schema)\n    else:  # pragma: no cover\n        columns = pl_schema or tuple(data[0])\n        native = pl.DataFrame(\n            (tuple(row.values()) for row in data), schema=columns, orient=\"row\"\n        )\n\n    return cls.from_native(native, context=context)\n",
      "asOf": "2026-11-19"
    },
    "F210": {
      "label": "Project source file, polars",
      "display": "src/narwhals/_polars/dataframe.py",
      "asOf": "2026-11-19"
    },
    "F211": {
      "label": "Project full_name, polars",
      "display": "narwhals-dev/narwhals",
      "asOf": "2026-11-19"
    },
    "F212": {
      "label": "Project stargazers_count, polars",
      "display": "1.8K",
      "asOf": "2026-11-19"
    },
    "F213": {
      "label": "Library name, pyspark",
      "display": "PySpark",
      "asOf": "2026-11-19"
    },
    "F214": {
      "label": "Monthly downloads, pyspark",
      "display": "48.4M",
      "asOf": "2026-11-19"
    },
    "F215": {
      "label": "License, pyspark",
      "display": "Apache-2.0",
      "asOf": "2026-11-19"
    },
    "F216": {
      "label": "Package release, pyspark",
      "display": "4.3.0",
      "asOf": "2026-11-19"
    },
    "F217": {
      "label": "Package release date, pyspark",
      "display": "Oct 2026",
      "asOf": "2026-11-19"
    },
    "F218": {
      "label": "Install, pyspark",
      "display": "pip install pyspark",
      "asOf": "2026-11-19"
    },
    "F219": {
      "label": "Quickstart, pyspark",
      "display": "from pyspark.sql import SparkSession\n\nspark = SparkSession.builder.getOrCreate()\n\nfrom datetime import datetime, date\nfrom pyspark.sql import Row\n\ndf = spark.createDataFrame([\n    Row(a=1, b=2., c='string1', d=date(2000, 1, 1), e=datetime(2000, 1, 1, 12, 0)),\n    Row(a=2, b=3., c='string2', d=date(2000, 2, 1), e=datetime(2000, 1, 2, 12, 0)),\n    Row(a=4, b=5., c='string3', d=date(2000, 3, 1), e=datetime(2000, 1, 3, 12, 0))\n])\ndf\n\ndf.show()\n",
      "asOf": "2026-11-19"
    },
    "F220": {
      "label": "Official description, pyspark",
      "display": "Apache Spark Python API",
      "asOf": "2026-11-19"
    },
    "F221": {
      "label": "Quickstart source file, pyspark",
      "display": "quickstart_df.html",
      "asOf": "2026-11-19"
    },
    "F222": {
      "label": "Repository stars, pyspark",
      "display": "44.6K",
      "asOf": "2026-11-19"
    },
    "F223": {
      "label": "Deferred execution, pyspark",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F224": {
      "label": "SQL over frames, pyspark",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F225": {
      "label": "Data model and execution role, pyspark",
      "display": "Spark DataFrames and SQL, backed by local/cluster Spark or Spark Connect.",
      "asOf": "2026-11-19"
    },
    "F226": {
      "label": "Python requirement, pyspark",
      "display": ">=3.11",
      "asOf": "2026-11-19"
    },
    "F227": {
      "label": "First-call prerequisites, pyspark",
      "display": "[\"Official local session/Row fixture/first show fragments; unused pandas import removed, notebook cell counters/output omitted. Python3.11+ per exact package metadata; Java17+ and JAVA_HOME/system Java setup required for local Spark. Spark Connect remote setup is a separate deployment mode.\"]",
      "asOf": "2026-11-19"
    },
    "F228": {
      "label": "Application integration constraints, pyspark",
      "display": "Kedro obtains a real SparkSession through its host get_spark_with_remote_support helper. Pandas input is converted using current createDataFrame; Spark input must be a native DataFrame. It removes mode and partitionBy from the copied options, uses current writer.mode and partitionBy (str or list), then format/options/save(path). Current Spark4.3 supports this classic DataFrameWriter interface and Spark Connect. The application class name SparkDatasetV2 does NOT mean it uses DataFrameWriterV2. Format/connector-specific options and usable output path remain caller responsibilities.",
      "asOf": "2026-11-19"
    },
    "F229": {
      "label": "Repository/download proxy scope, pyspark",
      "display": "Repository stars and distribution downloads cover more than Python DataFrame analysis alone.",
      "asOf": "2026-11-19"
    },
    "F230": {
      "label": "Project function, pyspark",
      "display": "def save(self, data: DataFrame | pd.DataFrame) -> None:\n    \"\"\"Saves pyspark dataframe.\n\n    Args:\n        data: PySpark DataFrame or Pandas DataFrame to save.\n              Pandas DataFrames will be automatically converted to Spark.\n    \"\"\"\n    import pandas as pd  # noqa: PLC0415\n\n    spark_session = get_spark_with_remote_support()\n\n    # Convert Pandas DataFrame to Spark DataFrame if needed\n    if isinstance(data, pd.DataFrame):\n        data = spark_session.createDataFrame(data)\n\n    save_path = self._get_save_path()\n    spark_save_path = to_spark_path(self._protocol, str(save_path))\n\n    # Create a copy of save_args to avoid mutation\n    save_args = self._save_args.copy()\n\n    # Extract mode and partitionBy (these are handled separately by Spark)\n    mode = save_args.pop(\"mode\", None)\n    partition_by = save_args.pop(\"partitionBy\", None)\n\n    # Prepare writer\n    writer = data.write\n\n    if mode:\n        writer = writer.mode(mode)\n    if partition_by:\n        writer = writer.partitionBy(partition_by)\n\n    # Save with remaining options\n    writer.format(self._file_format).options(**save_args).save(spark_save_path)\n",
      "asOf": "2026-11-19"
    },
    "F231": {
      "label": "Project source file, pyspark",
      "display": "kedro-datasets/kedro_datasets/spark/spark_dataset_v2.py",
      "asOf": "2026-11-19"
    },
    "F232": {
      "label": "Project full_name, pyspark",
      "display": "kedro-org/kedro-plugins",
      "asOf": "2026-11-19"
    },
    "F233": {
      "label": "Project stargazers_count, pyspark",
      "display": "121",
      "asOf": "2026-11-19"
    },
    "F234": {
      "label": "Library name, dask",
      "display": "Dask",
      "asOf": "2026-11-19"
    },
    "F235": {
      "label": "Monthly downloads, dask",
      "display": "31.5M",
      "asOf": "2026-11-19"
    },
    "F236": {
      "label": "License, dask",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-19"
    },
    "F237": {
      "label": "Package release, dask",
      "display": "2026.8.0",
      "asOf": "2026-11-19"
    },
    "F238": {
      "label": "Package release date, dask",
      "display": "Aug 2026",
      "asOf": "2026-11-19"
    },
    "F239": {
      "label": "Install, dask",
      "display": "python -m pip install \"dask[dataframe]\"",
      "asOf": "2026-11-19"
    },
    "F240": {
      "label": "Quickstart, dask",
      "display": "import numpy as np\nimport pandas as pd\nimport dask.dataframe as dd\n\nindex = pd.date_range(\"2021-09-01\", periods=2400, freq=\"1h\")\ndf = pd.DataFrame({\"a\": np.arange(2400), \"b\": list(\"abcaddbe\" * 300)}, index=index)\nddf = dd.from_pandas(df, npartitions=10)\nddf\n\nddf.a.mean()\nddf.a.mean().compute()\n",
      "asOf": "2026-11-19"
    },
    "F241": {
      "label": "Repository stars, dask",
      "display": "14.0K",
      "asOf": "2026-11-19"
    },
    "F242": {
      "label": "Deferred execution, dask",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F243": {
      "label": "SQL over frames, dask",
      "display": "Undocumented",
      "asOf": "2026-11-19"
    },
    "F244": {
      "label": "Data model and execution role, dask",
      "display": "Partitioned arrays/DataFrames and delayed task graphs, with optional distributed scheduling.",
      "asOf": "2026-11-19"
    },
    "F245": {
      "label": "Python requirement, dask",
      "display": ">=3.10",
      "asOf": "2026-11-19"
    },
    "F246": {
      "label": "First-call prerequisites, dask",
      "display": "[\"Official synthetic-frame/first mean.compute sequence; unrelated array/bag imports and later unique operation omitted. DataFrame extra installs pandas/Arrow requirements. compute materializes the scalar, not the entire original frame.\"]",
      "asOf": "2026-11-19"
    },
    "F247": {
      "label": "Application integration constraints, dask",
      "display": "The original module imports dask.array as da. Inputs must be 1D or 2D arrays with known chunks and one feature-axis chunk for 2D. Actual ShuffleSplit caller uses check_array with accept_multiple_blocks=False, rejecting multiple feature-axis chunks. Index blocks are paired with corresponding source row blocks and contain GLOBAL row positions; the function subtracts each block offset. This corrects the old local-index docstring in research facts without modifying source. Both arrays yield one Delayed per chunk; delayed subtraction/getitem build tasks. from_delayed receives one delayed numpy block, exact selected-row shape, and source dtype; concatenate joins axis0.",
      "asOf": "2026-11-19"
    },
    "F248": {
      "label": "Project function, dask",
      "display": "def _blockwise_slice(arr, idx):\n    \"\"\"Slice an array that is blockwise-aligned with idx.\n\n    Parameters\n    ----------\n    arr : Dask array\n    idx : Dask array\n        Should have the following properties\n\n        * Same blocks as `arr` along the first dimension\n        * Contains only integers\n        * Each block's values should be between ``[0, len(block))``\n\n    Returns\n    -------\n    sliced : dask.Array\n    \"\"\"\n    objs = []\n    offsets = np.hstack([0, np.cumsum(arr.chunks[0])[:-1]])\n\n    for i, (x, idx2) in enumerate(\n        zip(arr.to_delayed().ravel(), idx.to_delayed().ravel())\n    ):\n        idx3 = idx2 - offsets[i]\n        objs.append(x[idx3])\n\n    shapes = idx.chunks[0]\n    if arr.ndim == 2:\n        P = arr.shape[1]\n        shapes = [(x, P) for x in shapes]\n    else:\n        shapes = [(x,) for x in shapes]\n\n    sliced = da.concatenate(\n        [\n            da.from_delayed(x, shape=shape, dtype=arr.dtype)\n            for x, shape in zip(objs, shapes)\n        ]\n    )\n    return sliced\n",
      "asOf": "2026-11-19"
    },
    "F249": {
      "label": "Project source file, dask",
      "display": "dask_ml/model_selection/_split.py",
      "asOf": "2026-11-19"
    },
    "F250": {
      "label": "Project full_name, dask",
      "display": "dask/dask-ml",
      "asOf": "2026-11-19"
    },
    "F251": {
      "label": "Project stargazers_count, dask",
      "display": "951",
      "asOf": "2026-11-19"
    },
    "F252": {
      "label": "Library name, xarray",
      "display": "xarray",
      "asOf": "2026-11-19"
    },
    "F253": {
      "label": "Monthly downloads, xarray",
      "display": "12.9M",
      "asOf": "2026-11-19"
    },
    "F254": {
      "label": "License, xarray",
      "display": "Apache-2.0",
      "asOf": "2026-11-19"
    },
    "F255": {
      "label": "Package release, xarray",
      "display": "2026.9.0",
      "asOf": "2026-11-19"
    },
    "F256": {
      "label": "Package release date, xarray",
      "display": "Sep 2026",
      "asOf": "2026-11-19"
    },
    "F257": {
      "label": "Install, xarray",
      "display": "pip install xarray",
      "asOf": "2026-11-19"
    },
    "F258": {
      "label": "Quickstart, xarray",
      "display": "import numpy as np\nimport pandas as pd\nimport xarray as xr\n\ndata = xr.DataArray(np.random.randn(2, 3), dims=(\"x\", \"y\"), coords={\"x\": [10, 20]})\ndata\n",
      "asOf": "2026-11-19"
    },
    "F259": {
      "label": "Official description, xarray",
      "display": "N-D labeled arrays and datasets in Python",
      "asOf": "2026-11-19"
    },
    "F260": {
      "label": "Quickstart source file, xarray",
      "display": "quick-overview.rst",
      "asOf": "2026-11-19"
    },
    "F261": {
      "label": "Repository stars, xarray",
      "display": "4.2K",
      "asOf": "2026-11-19"
    },
    "F262": {
      "label": "Deferred execution, xarray",
      "display": "Via plugin",
      "asOf": "2026-11-19"
    },
    "F263": {
      "label": "SQL over frames, xarray",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F264": {
      "label": "Data model and execution role, xarray",
      "display": "Labeled multidimensional arrays with named dimensions/coordinates and optional Dask execution.",
      "asOf": "2026-11-19"
    },
    "F265": {
      "label": "Python requirement, xarray",
      "display": ">=3.11",
      "asOf": "2026-11-19"
    },
    "F266": {
      "label": "First-call prerequisites, xarray",
      "display": "[\"Official first labeled-array creation. Random values are demo inputs; output not a measured result. Install exact published xarray distribution; numpy/pandas are declared dependencies.\"]",
      "asOf": "2026-11-19"
    },
    "F267": {
      "label": "Application integration constraints, xarray",
      "display": "Xclim imports xarray as xr. The numeric DataArray must have a datetime-like time coordinate and valid unit metadata for the host to_agg_units helper. Current resample accepts a mapping from time to a valid frequency. std(dim=\"time\",keep_attrs=True) and mean with the same keywords are supported. The original default MS then YS frequencies compute monthly standard deviations followed by yearly means; compare_offsets rejects a main period no larger than the subperiod.",
      "asOf": "2026-11-19"
    },
    "F268": {
      "label": "Project function, xarray",
      "display": "def day_to_day_variability(data: xr.DataArray, freq: Freq = \"YS\", subfreq: Freq = \"MS\"):\n    \"\"\"\n    Compute the mean of day-to-day variability.\n\n    Computes the standard deviation of the variable within each sub-period (e.g. month),\n    then averages those standard deviations over the main resampling period (e.g. year).\n    This provides a measure of typical day-to-day variability as described in :cite:t:`kotz_2021`.\n\n    Parameters\n    ----------\n    data : xr.DataArray\n        The input variable.\n    freq : Freq\n        Resampling frequency used to average the sub-period standard deviations. Default: \"YS\".\n    subfreq : Freq\n        Resampling frequency used to compute the standard deviation. Default: \"MS\".\n\n    Returns\n    -------\n    xr.DataArray, [same as data]\n        Mean of the sub-period standard deviations over each period defined by `freq`.\n\n    References\n    ----------\n    :cite:cts:`kotz_2021`\n    \"\"\"\n    if compare_offsets(freq, \"<=\", subfreq):\n        raise ValueError(\"Averaging frequency must be larger than the variability frequency.\")\n    variability = data.resample({\"time\": subfreq}).std(dim=\"time\", keep_attrs=True)\n    out = variability.resample({\"time\": freq}).mean(dim=\"time\", keep_attrs=True)\n    return to_agg_units(out, to_agg_units(variability, data, \"std\"), \"mean\")\n",
      "asOf": "2026-11-19"
    },
    "F269": {
      "label": "Project source file, xarray",
      "display": "src/xclim/compute/generic.py",
      "asOf": "2026-11-19"
    },
    "F270": {
      "label": "Project full_name, xarray",
      "display": "Ouranosinc/xclim",
      "asOf": "2026-11-19"
    },
    "F271": {
      "label": "Project stargazers_count, xarray",
      "display": "412",
      "asOf": "2026-11-19"
    },
    "F272": {
      "label": "Library name, ibis-framework",
      "display": "Ibis",
      "asOf": "2026-11-19"
    },
    "F273": {
      "label": "Monthly downloads, ibis-framework",
      "display": "3.6M",
      "asOf": "2026-11-19"
    },
    "F274": {
      "label": "License, ibis-framework",
      "display": "Apache-2.0",
      "asOf": "2026-11-19"
    },
    "F275": {
      "label": "Package release, ibis-framework",
      "display": "12.0.0",
      "asOf": "2026-11-19"
    },
    "F276": {
      "label": "Package release date, ibis-framework",
      "display": "Feb 2026",
      "asOf": "2026-11-19"
    },
    "F277": {
      "label": "Install, ibis-framework",
      "display": "pip install 'ibis-framework[duckdb,examples]'",
      "asOf": "2026-11-19"
    },
    "F278": {
      "label": "Quickstart, ibis-framework",
      "display": "import ibis\n\ncon = ibis.connect(\"duckdb://penguins.ddb\")\ncon.create_table(\n    \"penguins\", ibis.examples.penguins.fetch().to_pyarrow(), overwrite=True\n)\n",
      "asOf": "2026-11-19"
    },
    "F279": {
      "label": "Official description, ibis-framework",
      "display": "The portable Python dataframe library",
      "asOf": "2026-11-19"
    },
    "F280": {
      "label": "Quickstart source file, ibis-framework",
      "display": "basics.qmd",
      "asOf": "2026-11-19"
    },
    "F281": {
      "label": "Repository stars, ibis-framework",
      "display": "6.7K",
      "asOf": "2026-11-19"
    },
    "F282": {
      "label": "Deferred execution, ibis-framework",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F283": {
      "label": "SQL over frames, ibis-framework",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F284": {
      "label": "Data model and execution role, ibis-framework",
      "display": "Lazy relational expressions compiled to an installed analytical backend.",
      "asOf": "2026-11-19"
    },
    "F285": {
      "label": "Python requirement, ibis-framework",
      "display": ">=3.10",
      "asOf": "2026-11-19"
    },
    "F286": {
      "label": "First-call prerequisites, ibis-framework",
      "display": "[\"Official first connection and create_table call, not later query tour. Uses DuckDB backend and examples extra, fetches public penguins fixture if unavailable locally, and creates penguins.ddb in the current directory. ibis-framework and unrelated PyPI ibis distributions cannot coexist under the same module name.\"]",
      "asOf": "2026-11-19"
    },
    "F287": {
      "label": "Application integration constraints, ibis-framework",
      "display": "This is an authored public-expression integration workflow in the Ibis project, not backend/compiler implementation code. TPC-H fixture part/lineitem tables supply typed part keys, ship dates, prices, discounts, and type strings. Current join accepts the Boolean equality predicate; filter accepts two predicates; ibis.date coerces the ISO date string. Host add_date constructs the next-month date. like(\"PROMO%\") returns BooleanColumn; ifelse(revenue,0) returns numeric values; sums feed a named agg metric. Native arithmetic is expression construction.",
      "asOf": "2026-11-19"
    },
    "F288": {
      "label": "Project function, ibis-framework",
      "display": "def _get_numeric_bin_values(\n    self, col: ibis.Column, num_bins: int\n) -> ibis.Table:\n    data = self._original_data\n    min_val = col.min().execute()\n    max_val = col.max().execute()\n\n    # Handle case where all values are the same\n    if min_val == max_val:\n        # Create a single bin with all the data\n        total_count = col.count().execute()\n        return ibis.memtable(\n            {\n                \"bin\": [0],\n                \"count\": [total_count],\n                \"bin_start\": [min_val],\n                \"bin_end\": [max_val],\n            }\n        ).execute()\n\n    bin_width = (max_val - min_val) / num_bins\n\n    # Assign bins and count occurrences\n    data = data.mutate(bin=col.histogram(nbins=num_bins))\n    value_counts = data[\"bin\"].value_counts(name=\"count\")\n\n    # Fill in missing bins\n    all_bins = ibis.range(num_bins).unnest().name(\"bin\").as_table()\n    joined = all_bins.left_join(value_counts, \"bin\").mutate(\n        count=ibis.coalesce(value_counts[\"count\"], 0)\n    )\n\n    # Compute bin_start and bin_end for each bin\n    # If the last bin, we use the last value for bin_end, else calculate the bin_end\n    result = joined.mutate(\n        bin_start=min_val + joined[\"bin\"] * bin_width,\n        bin_end=ibis.cases(\n            (joined[\"bin\"] == (num_bins - 1), max_val),\n            else_=min_val + (joined[\"bin\"] + 1) * bin_width,\n        ),\n    ).order_by(\"bin\")\n\n    return result.execute()\n",
      "asOf": "2026-11-19"
    },
    "F289": {
      "label": "Project source file, ibis-framework",
      "display": "marimo/_plugins/ui/_impl/tables/ibis_table.py",
      "asOf": "2026-11-19"
    },
    "F290": {
      "label": "Project full_name, ibis-framework",
      "display": "marimo-team/marimo",
      "asOf": "2026-11-19"
    },
    "F291": {
      "label": "Project stargazers_count, ibis-framework",
      "display": "23.6K",
      "asOf": "2026-11-19"
    },
    "F292": {
      "label": "Developer need",
      "display": "Tables that fit in memory",
      "asOf": "2026-11-17"
    },
    "F293": {
      "label": "Pick reason",
      "display": "eager labeled dataframes",
      "asOf": "2026-11-17"
    },
    "F294": {
      "label": "Pick alternative reason",
      "display": "if the data outgrows memory",
      "asOf": "2026-11-17"
    },
    "F295": {
      "label": "Developer need",
      "display": "Fast single-machine queries",
      "asOf": "2026-11-17"
    },
    "F296": {
      "label": "Pick reason",
      "display": "lazy, parallel expressions",
      "asOf": "2026-11-17"
    },
    "F297": {
      "label": "Pick alternative reason",
      "display": "if the team writes SQL",
      "asOf": "2026-11-17"
    },
    "F298": {
      "label": "Developer need",
      "display": "SQL over local files and frames",
      "asOf": "2026-11-17"
    },
    "F299": {
      "label": "Pick reason",
      "display": "in-process SQL database",
      "asOf": "2026-11-17"
    },
    "F300": {
      "label": "Pick alternative reason",
      "display": "if a dataframe API is preferred",
      "asOf": "2026-11-17"
    },
    "F301": {
      "label": "Developer need",
      "display": "Data on a Spark cluster",
      "asOf": "2026-11-17"
    },
    "F302": {
      "label": "Pick reason",
      "display": "Spark DataFrames and SQL",
      "asOf": "2026-11-17"
    },
    "F303": {
      "label": "Pick alternative reason",
      "display": "if the stack stays in Python",
      "asOf": "2026-11-17"
    },
    "F304": {
      "label": "Developer need",
      "display": "Scaling existing pandas code",
      "asOf": "2026-11-17"
    },
    "F305": {
      "label": "Pick reason",
      "display": "partitioned pandas frames",
      "asOf": "2026-11-17"
    },
    "F306": {
      "label": "Pick alternative reason",
      "display": "if a Spark cluster already exists",
      "asOf": "2026-11-17"
    },
    "F307": {
      "label": "Developer need",
      "display": "Labeled multidimensional arrays",
      "asOf": "2026-11-17"
    },
    "F308": {
      "label": "Pick reason",
      "display": "named dimensions and coordinates",
      "asOf": "2026-11-17"
    },
    "F309": {
      "label": "Pick alternative reason",
      "display": "if the data is a flat table",
      "asOf": "2026-11-17"
    },
    "F310": {
      "label": "Developer need",
      "display": "One API across databases",
      "asOf": "2026-11-17"
    },
    "F311": {
      "label": "Pick reason",
      "display": "portable lazy expressions",
      "asOf": "2026-11-17"
    },
    "F312": {
      "label": "Pick alternative reason",
      "display": "if one local engine is enough",
      "asOf": "2026-11-17"
    },
    "F313": {
      "label": "Developer need",
      "display": "Columnar data exchange",
      "asOf": "2026-11-17"
    },
    "F314": {
      "label": "Pick reason",
      "display": "the Arrow memory format",
      "asOf": "2026-11-17"
    },
    "F315": {
      "label": "Pick alternative reason",
      "display": "if analysis methods matter more",
      "asOf": "2026-11-17"
    }
  },
  "dataCheckedAt": "2026-11-19",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python data analysis libraries pandas Polars Dask DuckDB dataframe SQL larger than memory code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
