{
  "id": "task_libraries:csv/python",
  "path": "/exapedia/python-csv-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python CSV libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python CSV libraries read comma-separated files into rows or tables and write data back out as CSV. A dataframe library parses the whole file into typed columns rather than returning one row at a time. These libraries let data pipelines and analytics apps load exports and logs saved as CSV."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python CSV 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": "F126"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pyarrow",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F141"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#duckdb",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F156"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#polars",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F173"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#dask",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F188"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#tablib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F205"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#clevercsv",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F222"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#petl",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F239"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F248"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ]
            ]
          ],
          "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": "text",
              "text": "pandas"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads among the registry packages in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F127"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "CSV type inference",
            "Chunked CSV reading"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#pandas",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F126"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pyarrow",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F141"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#duckdb",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F156"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#polars",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F173"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#dask",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F188"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#tablib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F205"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#clevercsv",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F222"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#petl",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F239"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "pandas",
          "name": [
            {
              "t": "fact",
              "fact": "F126"
            }
          ],
          "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/reference/api/pandas.read_csv.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F13"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F126"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/kedro-org/kedro-plugins",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F139"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def load(self) -> pd.DataFrame:\n    load_path = str(self._get_load_path())\n    if self._protocol == \"file\":\n        # file:// protocol seems to misbehave on Windows\n        # (<urlopen error file not on local host>),\n        # so we don't join that back to the filepath;\n        # storage_options also don't work with local paths\n        return pd.read_csv(load_path, **self._load_args)\n\n    load_path = f\"{self._protocol}{PROTOCOL_DELIMITER}{load_path}\"\n    return pd.read_csv(\n        load_path, storage_options=self._storage_options, **self._load_args\n    )\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/kedro-org/kedro-plugins/blob/f2516d069e6930c5dd3e1598642e736d7e66fa5f/kedro-datasets/kedro_datasets/pandas/csv_dataset.py#L178-L190",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F138"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Public%20Python%20projects%20using%20pandas%20for%20typed%20CSV%20imports%2C%20incremental%20processing%2C%20schema%20overrides%20and%20CSV%20export&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": "F126"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import pandas as pd\nfrom io import StringIO\nframe = pd.read_csv(StringIO(\"name,score\\nAda,9\\n\"))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "io.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F131"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pyarrow",
          "name": [
            {
              "t": "fact",
              "fact": "F141"
            }
          ],
          "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/csv.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F33"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://arrow.apache.org/docs/python/csv.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F141"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F34"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F35"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F36"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F37"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/ray-project/ray",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F154"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _read_stream(self, f: \"pyarrow.NativeFile\", path: str) -> Iterator[Block]:\n    import pyarrow as pa\n    from pyarrow import csv\n\n    # Re-init invalid row handler: https://issues.apache.org/jira/browse/ARROW-17641\n    if hasattr(self.parse_options, \"invalid_row_handler\"):\n        self.parse_options.invalid_row_handler = (\n            self.parse_options.invalid_row_handler\n        )\n\n    filter_expr = (\n        self._predicate_expr.to_pyarrow()\n        if self._predicate_expr is not None\n        else None\n    )\n\n    try:\n        reader = csv.open_csv(\n            f,\n            read_options=self.read_options,\n            parse_options=self.parse_options,\n            **self.arrow_csv_args,\n        )\n        schema = None\n        while True:\n            try:\n                batch = reader.read_next_batch()\n                table = pa.Table.from_batches([batch], schema=schema)\n                if schema is None:\n                    schema = table.schema\n                if filter_expr is not None:\n                    table = table.filter(filter_expr)\n\n                yield table\n            except StopIteration:\n                return\n    except pa.lib.ArrowInvalid as e:\n        raise ValueError(\n            f\"Failed to read CSV file: {path}. \"\n            \"Please check the CSV file has correct format, or filter out non-CSV \"\n            \"file with 'partition_filter' field. See read_csv() documentation for \"\n            \"more details.\"\n        ) from e\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/ray-project/ray/blob/9be0dbc4858576350eb15e65454c0ccb13265972/python/ray/data/_internal/datasource/csv_datasource.py#L40-L82",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F153"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Public%20Python%20projects%20using%20pyarrow%20for%20typed%20CSV%20imports%2C%20incremental%20processing%2C%20schema%20overrides%20and%20CSV%20export&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": "F141"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from pyarrow import csv\ntable = csv.read_csv(\"data.csv\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://arrow.apache.org/docs/python/csv.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "csv.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F146"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "duckdb",
          "name": [
            {
              "t": "fact",
              "fact": "F156"
            }
          ],
          "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/reference/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F163"
            }
          ],
          "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://duckdb.org/docs/2.0/clients/python/reference/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F156"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/narwhals-dev/narwhals",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F171"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def scan_csv(\n    self, source: NormalizedSource, *, separator: str = \",\", **kwds: Any\n) -> DuckDBLazyFrame:\n    validate_separators(separator, (\"delimiter\", \"delim\", \"sep\"), kwds)\n    native = duckdb.read_csv(source, delimiter=separator, **kwds)\n    return self._lazyframe.from_native(native, context=self)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/narwhals-dev/narwhals/blob/98d36ec24a05bd9b58f227d5ec5aafcd87eca1c8/src/narwhals/_duckdb/namespace.py#L80-L85",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F170"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=duckdb%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 duckdb\nrelation = duckdb.read_csv(\"data.csv\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://duckdb.org/docs/2.0/clients/python/reference/",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F161"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "polars",
          "name": [
            {
              "t": "fact",
              "fact": "F173"
            }
          ],
          "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/api/python/stable/reference/api/polars.read_csv.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F60"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.pola.rs/api/python/stable/reference/api/polars.read_csv.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F173"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F61"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F62"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F63"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/narwhals-dev/narwhals",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F186"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def scan_csv(\n    self, source: NormalizedSource, *, separator: str = \",\", **kwds: Any\n) -> PolarsLazyFrame:\n    native = (\n        pl.read_csv(source, separator=separator, **kwds).lazy()\n        if self._read_eagerly(source)\n        else pl.scan_csv(source, separator=separator, **kwds)\n    )\n    return self._lazyframe.from_native(native, context=self)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/narwhals-dev/narwhals/blob/98d36ec24a05bd9b58f227d5ec5aafcd87eca1c8/src/narwhals/_polars/namespace.py#L139-L147",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F185"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Public%20Python%20projects%20using%20polars%20for%20typed%20CSV%20imports%2C%20incremental%20processing%2C%20schema%20overrides%20and%20CSV%20export&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": "F173"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import polars as pl\nframe = pl.read_csv(\"data.csv\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.pola.rs/api/python/stable/reference/api/polars.read_csv.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "csv.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F178"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "dask",
          "name": [
            {
              "t": "fact",
              "fact": "F188"
            }
          ],
          "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/generated/dask.dataframe.read_csv.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F195"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.dask.org/en/stable/generated/dask.dataframe.read_csv.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F188"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/fugue-project/fugue",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F203"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _safe_load_csv(path: str, **kwargs: Any) -> dd.DataFrame:\n    if not isfile(path):\n        return dd.read_csv(join(path, \"*.csv\"), **kwargs)\n    try:\n        return dd.read_csv(path, **kwargs)\n    except (IsADirectoryError, PermissionError):  # pragma: no cover\n        return dd.read_csv(join(path, \"*.csv\"), **kwargs)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/fugue-project/fugue/blob/8bf366ad8f00a800a6ae328fe5032218c1b95330/fugue_dask/_io.py#L102-L108",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F202"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=dask%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F188"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import dask.dataframe as dd\nframe = dd.read_csv(\"data/*.csv\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.dask.org/en/stable/generated/dask.dataframe.read_csv.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "dask.dataframe.read_csv.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F193"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "tablib",
          "name": [
            {
              "t": "fact",
              "fact": "F205"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/jazzband/tablib"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/tablib"
            },
            {
              "label": "Docs",
              "href": "https://tablib.readthedocs.io/en/stable/api.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F212"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://tablib.readthedocs.io/en/stable/api.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F205"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/MatteoGuadrini/pyreports",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F220"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def read(self, **kwargs):\n    \"\"\"Read csv format\n\n    :return: Dataset object\n    \"\"\"\n    with open(self.file) as file:\n        return tablib.Dataset().load(file, **kwargs)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/MatteoGuadrini/pyreports/blob/e9a6d2c77dab73e481da629f092b3b0a7ce909e3/pyreports/io.py#L208-L214",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F219"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=tablib%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F205"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import tablib\ndata = tablib.Dataset().load(\"name,score\\nAda,9\\n\", format=\"csv\")\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://tablib.readthedocs.io/en/stable/api.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "api.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F210"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "clevercsv",
          "name": [
            {
              "t": "fact",
              "fact": "F222"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/alan-turing-institute/CleverCSV"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/clevercsv"
            },
            {
              "label": "Docs",
              "href": "https://clevercsv.readthedocs.io/en/latest/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F229"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://clevercsv.readthedocs.io/en/latest/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F222"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/mathesar-foundation/mathesar",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F237"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def copy_datafile_to_table(\n    user,\n    data_file_id,\n    table_name,\n    schema_oid,\n    conn,\n    comment=None,\n    import_into_temp_table=False,\n    header_to_validate=[]\n):\n    data_file = DataFile.objects.get(id=data_file_id, user=user)\n    header = data_file.header\n    dialect = csv.dialect.SimpleDialect(\n        data_file.delimiter,\n        data_file.quotechar,\n        data_file.escapechar\n    )\n    table_name = table_name or data_file.base_name\n\n    with data_file.file.open(\"rb\") as raw:\n        f = io.TextIOWrapper(raw, encoding=data_file.encoding, newline=\"\")\n        reader = csv.reader(f, dialect)\n        first_row = next(reader)\n        if header:\n            if import_into_temp_table:\n                assert list(enumerate(first_row)) == header_to_validate, \"Parsing mismatch\"\n            column_names = _process_column_names(first_row)\n            rows = reader\n        else:\n            column_names = [\n                f\"{COLUMN_NAME_TEMPLATE}{i}\" for i in range(len(first_row))\n            ]\n            # The first row is data, not a header: chain it back in\n            rows = itertools.chain([first_row], reader)\n        processed_rows = ([None if val == '' else val for val in row] for row in rows)\n        import_info = create_and_import_from_rows(\n            processed_rows,\n            table_name,\n            schema_oid,\n            column_names,\n            conn,\n            comment=comment,\n            import_into_temp_table=import_into_temp_table\n        )\n\n    return {\n        \"oid\": import_info['table_oid'],\n        \"name\": import_info.get('table_name'),\n        \"renamed_columns\": import_info.get('renamed_columns'),\n        \"pkey_column_attnum\": import_info.get('pkey_column_attnum'),\n    }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/mathesar-foundation/mathesar/blob/3833c3ae5714f164dd6870f4d28865e78d60a4cc/mathesar/imports/datafile.py#L14-L64",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F236"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=clevercsv%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F222"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import clevercsv\nrows = clevercsv.read_table('./imdb.csv')\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://clevercsv.readthedocs.io/en/latest/",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F227"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "petl",
          "name": [
            {
              "t": "fact",
              "fact": "F239"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/petl-developers/petl"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/petl"
            },
            {
              "label": "Docs",
              "href": "https://github.com/petl-developers/petl/blob/master/petl/io/csv.py"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F246"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F248"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/petl-developers/petl/blob/master/petl/io/csv.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F239"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/redstreet/beancount_reds_importers",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F254"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def read_raw(self, file):\n    return etl.fromcsv(\n        file,\n        encoding=getattr(self, \"file_encoding\", None),\n        delimiter=getattr(self, \"csv_delimiter\", \",\"),\n    )\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/redstreet/beancount_reds_importers/blob/7a3f7c73bac42696b5fb82d53030cf5dad241419/beancount_reds_importers/libreader/csvreader.py#L151-L156",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F253"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=petl%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F239"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import petl as etl\ntable = etl.fromcsv(\"data.csv\")\nrows = list(table)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/petl-developers/petl/blob/master/petl/io/csv.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "csv.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F244"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python CSV library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#pandas",
          "label": [
            {
              "t": "text",
              "text": "pandas"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits most analysis work that loads a CSV into a DataFrame. "
        },
        {
          "t": "link",
          "href": "#polars",
          "label": [
            {
              "t": "text",
              "text": "Polars"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits large files, with lazy scans that push filters and column selection into the read. "
        },
        {
          "t": "link",
          "href": "#clevercsv",
          "label": [
            {
              "t": "text",
              "text": "CleverCSV"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits messy files with an unknown dialect."
        }
      ]
    },
    {
      "q": "How do I read a CSV file in Python?",
      "a": [
        {
          "t": "text",
          "text": "The built-in csv module reads a file row by row. "
        },
        {
          "t": "link",
          "href": "#pandas",
          "label": [
            {
              "t": "text",
              "text": "pandas"
            }
          ]
        },
        {
          "t": "text",
          "text": " reads the whole file into a DataFrame with "
        },
        {
          "t": "code",
          "text": "read_csv"
        },
        {
          "t": "text",
          "text": ", and "
        },
        {
          "t": "link",
          "href": "#polars",
          "label": [
            {
              "t": "text",
              "text": "Polars"
            }
          ]
        },
        {
          "t": "text",
          "text": " offers its own "
        },
        {
          "t": "code",
          "text": "read_csv"
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "code",
          "text": "scan_csv"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "q": "Polars vs pandas: which should I use for CSV files?",
      "a": [
        {
          "t": "link",
          "href": "#polars",
          "label": [
            {
              "t": "text",
              "text": "Polars"
            }
          ]
        },
        {
          "t": "text",
          "text": " reads CSV files into eager DataFrames or lazy query plans. "
        },
        {
          "t": "link",
          "href": "#pandas",
          "label": [
            {
              "t": "text",
              "text": "pandas"
            }
          ]
        },
        {
          "t": "text",
          "text": " reads CSV data into an eager DataFrame with many parsing and conversion options."
        }
      ]
    },
    {
      "q": "How do I read a CSV with pandas?",
      "a": [
        {
          "t": "text",
          "text": "Call "
        },
        {
          "t": "code",
          "text": "pandas.read_csv"
        },
        {
          "t": "text",
          "text": " with a local path or URL. It returns a DataFrame, and its keyword arguments control the delimiter, column types, and parsing."
        }
      ]
    },
    {
      "q": "How do I read a CSV with Polars?",
      "a": [
        {
          "t": "text",
          "text": "Call "
        },
        {
          "t": "code",
          "text": "polars.read_csv"
        },
        {
          "t": "text",
          "text": " for a DataFrame or "
        },
        {
          "t": "code",
          "text": "polars.scan_csv"
        },
        {
          "t": "text",
          "text": " for a LazyFrame. Both accept a separator and other keyword options."
        }
      ]
    }
  ],
  "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": "Incremental reading, pandas",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Explicit column types, pandas",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Parallel parsing, pandas",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "CSV writing, pandas",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Output formats, pandas",
      "display": "CSV",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "Install, pandas",
      "display": "pip install pandas",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "What it does, pandas",
      "display": "Reads CSV data into a DataFrame with configurable parsing and conversion.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, pandas",
      "display": "Controls column types and conversion",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, pandas",
      "display": "Set dtype, converters, and missing-value rules for each input.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths lead, pandas",
      "display": "Returns configurable row chunks",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "strengths, pandas",
      "display": "Use chunksize or iterator when processing a CSV incrementally.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations lead, pandas",
      "display": "Low-memory mode still returns everything",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations, pandas",
      "display": "Set chunksize or iterator when rows must be processed incrementally.",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Quickstart, pandas",
      "display": "import pandas as pd\nfrom io import StringIO\ndata = \"col1,col2,col3\\na,b,1\\na,b,2\\nc,d,3\"\npd.read_csv(StringIO(data))\npd.read_csv(StringIO(data), usecols=lambda x: x.upper() in [\"COL1\", \"COL3\"])\ndata = \"col1,col2,col3\\na,b,1\\na,b,2\\nc,d,3\"\npd.read_csv(StringIO(data))\npd.read_csv(StringIO(data), skiprows=lambda x: x % 2 != 0)\nimport numpy as np\ndata = \"a,b,c,d\\n1,2,3,4\\n5,6,7,8\\n9,10,11\"\nprint(data)\ndf = pd.read_csv(StringIO(data), dtype=object)\ndf\ndf[\"a\"][0]\ndf = pd.read_csv(StringIO(data), dtype={\"b\": object, \"c\": np.float64, \"d\": \"Int64\"})\ndf.dtypes\ndata = \"col_1\\n1\\n2\\n'A'\\n4.22\"\ndf = pd.read_csv(StringIO(data), converters={\"col_1\": str})\ndf\ndf[\"col_1\"].apply(type).value_counts()\ndf2 = pd.read_csv(StringIO(data))\ndf2[\"col_1\"] = pd.to_numeric(df2[\"col_1\"], errors=\"coerce\")\ndf2\ndf2[\"col_1\"].apply(type).value_counts()\n",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Library name, pyarrow",
      "display": "PyArrow",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Monthly downloads, pyarrow",
      "display": "427.4M",
      "asOf": "2026-11-16"
    },
    "F23": {
      "label": "License, pyarrow",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Package release, pyarrow",
      "display": "26.0.1, Nov 2026",
      "asOf": "2026-11-03"
    },
    "F25": {
      "label": "Package release date, pyarrow",
      "display": "Nov 2026",
      "asOf": "2026-11-03"
    },
    "F26": {
      "label": "Repository stars, pyarrow",
      "display": "17.3K",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Incremental reading, pyarrow",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Explicit column types, pyarrow",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Parallel parsing, pyarrow",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "CSV writing, pyarrow",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Output formats, pyarrow",
      "display": "CSV",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Install, pyarrow",
      "display": "pip install pyarrow",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "What it does, pyarrow",
      "display": "Reads and writes columnar Arrow data in CSV format.",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "strengths lead, pyarrow",
      "display": "Supports multithreaded bulk parsing",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "strengths, pyarrow",
      "display": "Use the bulk reader when parallel CSV parsing suits the workload.",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "strengths lead, pyarrow",
      "display": "Declares conversion types explicitly",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "strengths, pyarrow",
      "display": "Provide column_types when inferred types would change identifiers or numeric values.",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "limitations lead, pyarrow",
      "display": "Incremental reads use one thread",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "limitations, pyarrow",
      "display": "Use read_csv when parallel bulk parsing matters more than incremental batches.",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "limitations lead, pyarrow",
      "display": "Streaming types freeze after inference",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "limitations, pyarrow",
      "display": "Set column_types when later batches contain values outside initially inferred types.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "Quickstart, pyarrow",
      "display": "from pyarrow import csv\nimport pyarrow as pa\nimport io\nsource = io.BytesIO(b'code\\n\"001\"\\n\"002\"\\n')\noptions = csv.ConvertOptions(column_types={'code': pa.string()})\ntable = csv.read_csv(source, convert_options=options)\ntable['code'].to_pylist()\nwith csv.CSVWriter(\"data.csv\", table.schema) as writer:\n    writer.write_table(table)\n",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "Project function, pyarrow",
      "display": "def read(self, nrows: int | None = None, row_offset: int = 0) -> DataFrame:\n    \"\"\"\n    Reads the contents of a CSV file into a DataFrame and\n    processes it according to the kwargs passed in the\n    constructor.\n\n    Parameters\n    ----------\n    nrows, row_offset\n        Ignored; the pyarrow engine always reads the whole file.\n\n    Returns\n    -------\n    DataFrame\n        The DataFrame created from the CSV file.\n    \"\"\"\n    pa = import_optional_dependency(\"pyarrow\")\n    pyarrow_csv = import_optional_dependency(\"pyarrow.csv\")\n    self._get_pyarrow_options()\n    convert_options = self._get_convert_options()\n    src: ReadBuffer[bytes] | _NewlineTerminatedReader = self.src\n    if \"a\\n\".encode(self.encoding).endswith(b\"a\\n\"):\n        # the reader appends b\"\\n\", a newline only in ASCII-compatible\n        # encodings\n        src = _NewlineTerminatedReader(self.src)\n\n    try:\n        table = pyarrow_csv.read_csv(\n            src,\n            read_options=pyarrow_csv.ReadOptions(**self.read_options),\n            parse_options=pyarrow_csv.ParseOptions(**self.parse_options),\n            convert_options=convert_options,\n        )\n    except pa.ArrowInvalid as err:\n        # pyarrow reports \"Empty CSV file or block\" when it cannot extract\n        # any columns from the source; re-raise as EmptyDataError so the\n        # pyarrow engine matches the \"c\" and \"python\" engines.\n        if \"Empty CSV file\" in str(err):\n            raise EmptyDataError(\"No columns to parse from file\") from err\n        raise ParserError(err) from err\n    except TypeError as err:\n        # pyarrow can only read from a binary buffer; a text-mode file\n        # handle raises a bare \"a bytes-like object is required\" TypeError.\n        if \"a bytes-like object is required\" in str(err):\n            raise TypeError(\n                \"The 'pyarrow' engine can only read from a binary file \"\n                \"object; the given file was opened in text mode\"\n            ) from err\n        raise\n\n    if self.usecols_dtype == \"empty\":\n        # GH#66056 pyarrow ignores an empty ``include_columns`` and returns\n        # every column; match the other engines by returning an empty frame.\n        table = table.select([]).slice(0, 0)\n\n    dtype_backend = self.kwds[\"dtype_backend\"]\n\n    # Convert all pa.null() cols -> float64 (non nullable)\n    # else Int64 (nullable case, see below)\n    if dtype_backend is lib.no_default:\n        new_schema = table.schema\n        new_type = pa.float64()\n        for i, arrow_type in enumerate(table.schema.types):\n            if pa.types.is_null(arrow_type):\n                new_schema = new_schema.set(\n                    i, new_schema.field(i).with_type(new_type)\n                )\n\n        table = table.cast(new_schema)\n\n    if self.header is not None and self.names is None:\n        new_names, self.unnamed_cols = self._dedup_column_names(table.column_names)\n        if new_names != table.column_names:\n            table = table.rename_columns(new_names)\n\n    multi_index_named = self._adjust_column_names(table)\n\n    if isinstance(self.dtype, defaultdict):\n        # GH#41574 materialize the factory default over the actual columns\n        # so missing keys get the default, matching the other engines\n        if self.names is not None:\n            # always set by _adjust_column_names when header is None\n            columns = list(self.names)\n        else:\n            columns = table.column_names\n        self.dtype = {col: self.dtype[col] for col in columns}\n\n    with warnings.catch_warnings():\n        warnings.filterwarnings(\n            \"ignore\",\n            \"make_block is deprecated\",\n            Pandas4Warning,\n        )\n        frame = arrow_table_to_pandas(\n            table,\n            dtype_backend=dtype_backend,\n            null_to_int64=True,\n            dtype=self.dtype,\n            names=self.names,\n        )\n\n    if self.names is not None:\n        frame.columns = self.names\n\n    return self._finalize_pandas_output(frame, multi_index_named)\n",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "Project function reference, pyarrow",
      "display": "arrow_parser_wrapper.py · read()",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "Project repository, pyarrow",
      "display": "pandas-dev/pandas",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Project stars, pandas-dev/pandas",
      "display": "49.6K",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project push date, pandas-dev/pandas",
      "display": "Aug 2026",
      "asOf": "2026-08-28"
    },
    "F48": {
      "label": "Library name, polars",
      "display": "Polars",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Monthly downloads, polars",
      "display": "65.3M",
      "asOf": "2026-11-16"
    },
    "F50": {
      "label": "License, polars",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Package release, polars",
      "display": "2.1.0, Oct 2026",
      "asOf": "2026-10-25"
    },
    "F52": {
      "label": "Package release date, polars",
      "display": "Oct 2026",
      "asOf": "2026-10-25"
    },
    "F53": {
      "label": "Repository stars, polars",
      "display": "40.3K",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Incremental reading, polars",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Explicit column types, polars",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Parallel parsing, polars",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "CSV writing, polars",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Output formats, polars",
      "display": "CSV",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Install, polars",
      "display": "pip install polars",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "What it does, polars",
      "display": "Reads CSV files into eager DataFrames or lazy query plans.",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "strengths lead, polars",
      "display": "Pushes filters into CSV scans",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "strengths, polars",
      "display": "Use lazy scans to push predicates and projections toward the reader.",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths lead, polars",
      "display": "Overrides inferred column types",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths, polars",
      "display": "Specify schema_overrides when selected columns need explicit types.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "limitations lead, polars",
      "display": "Eager reads limit lazy optimization",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "limitations, polars",
      "display": "Use scan_csv so reader-level optimizations apply during file scanning.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "Quickstart, polars",
      "display": "# --8<-- [start:setup]\nimport polars as pl\n\n# --8<-- [end:setup]\n\n\"\"\"\n# --8<-- [start:read]\ndf = pl.read_csv(\"docs/assets/data/path.csv\")\n# --8<-- [end:read]\n\"\"\"\n\n# --8<-- [start:write]\ndf = pl.DataFrame({\"foo\": [1, 2, 3], \"bar\": [None, \"bak\", \"baz\"]})\ndf.write_csv(\"docs/assets/data/path.csv\")\n# --8<-- [end:write]\n\n# --8<-- [start:scan]\ndf = pl.scan_csv(\"docs/assets/data/path.csv\")\n# --8<-- [end:scan]\n",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "Project function, polars",
      "display": "def scan_csv(\n    self, source: NormalizedSource, *, separator: str = \",\", **kwds: Any\n) -> PolarsLazyFrame:\n    native = (\n        pl.read_csv(source, separator=separator, **kwds).lazy()\n        if self._read_eagerly(source)\n        else pl.scan_csv(source, separator=separator, **kwds)\n    )\n    return self._lazyframe.from_native(native, context=self)\n",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "Project function reference, polars",
      "display": "namespace.py · scan_csv()",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "Project repository, polars",
      "display": "narwhals-dev/narwhals",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Project stars, narwhals-dev/narwhals",
      "display": "1.8K",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project push date, narwhals-dev/narwhals",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F73": {
      "label": "Library name, csv",
      "display": "csv",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Monthly downloads, csv",
      "display": "Standard library",
      "asOf": "2026-11-16"
    },
    "F75": {
      "label": "License, csv",
      "display": "PSF License Version 2",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Package release, csv",
      "display": "With Python",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Undated package release, csv",
      "display": "With Python",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Repository context, csv",
      "display": "Part of Python",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Incremental reading, csv",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "CSV writing, csv",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Output formats, csv",
      "display": "CSV",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Install, csv",
      "display": "python -c \"import csv\"",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "What it does, csv",
      "display": "Provides Python’s bundled CSV reading and writing APIs.",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "strengths lead, csv",
      "display": "Processes rows incrementally",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "strengths, csv",
      "display": "Iterate through CSV rows without building a dataframe.",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "strengths lead, csv",
      "display": "Handles dialect-specific CSV syntax",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "strengths, csv",
      "display": "Configure delimiters, quoting and escape behavior through reader and writer options.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "limitations lead, csv",
      "display": "Values stay strings by default",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "limitations, csv",
      "display": "Convert fields explicitly when numbers, dates, or nulls need typed values.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "Quickstart, csv",
      "display": "import csv\n\nwith open('names.csv', 'w', newline='') as csvfile:\n    fieldnames = ['first_name', 'last_name']\n    writer = csv.DictWriter(csvfile, fieldnames=fieldnames)\n\n    writer.writeheader()\n    writer.writerow({'first_name': 'Baked', 'last_name': 'Beans'})\n    writer.writerow({'first_name': 'Lovely', 'last_name': 'Spam'})\n    writer.writerow({'first_name': 'Wonderful', 'last_name': 'Spam'})\n\n",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "Project function, csv",
      "display": "@classmethod\ndef export_stream_set(cls, dataset, **kwargs):\n    \"\"\"Returns CSV representation of Dataset as file-like.\"\"\"\n    stream = StringIO()\n\n    kwargs.setdefault('delimiter', cls.DEFAULT_DELIMITER)\n\n    _csv = csv.writer(stream, **kwargs)\n\n    for row in dataset._package(dicts=False):\n        _csv.writerow(row)\n\n    stream.seek(0)\n    return stream\n",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "Project function reference, csv",
      "display": "_csv.py · export_stream_set()",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "Project repository, csv",
      "display": "jazzband/tablib",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "Project stars, jazzband/tablib",
      "display": "4.8K",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Project push date, jazzband/tablib",
      "display": "Nov 2026",
      "asOf": "2026-11-11"
    },
    "F96": {
      "label": "Developer need",
      "display": "Bundled row-by-row CSV processing",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Why choose csv",
      "display": "incremental row iteration without a dataframe",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Developer need in introduction",
      "display": "bundled row-by-row CSV processing",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "When to consider pandas",
      "display": "per-column types and dataframe conversion rules are required",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need",
      "display": "Typed dataframe ingestion",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Why choose pandas",
      "display": "column types, converters, and missing-value rules",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need in introduction",
      "display": "typed dataframe ingestion",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "When to consider polars",
      "display": "reader-level filter and projection pushdown is central",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need",
      "display": "Filter and projection pushdown",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Why choose polars",
      "display": "lazy CSV scans with reader-level optimization",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need in introduction",
      "display": "filter and projection pushdown",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need",
      "display": "Parallel columnar CSV ingestion",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Why choose pyarrow",
      "display": "bulk parsing into Arrow tables",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need in introduction",
      "display": "parallel columnar CSV ingestion",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "When to consider pandas",
      "display": "an existing pandas pipeline should consume row chunks",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Page introduction",
      "display": "Python csv libraries let developers read or write tabular CSV data.",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "FAQ: Which Python CSV library should I choose?",
      "display": "csv provides row iteration in Python’s standard library.",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "FAQ: Which Python CSV library should I choose?",
      "display": "pandas accepts declared column types and conversion rules.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Which Python CSV library should I choose?",
      "display": "Polars lazy scans can push filters and projections toward CSV reading.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Which Python CSV library should I choose?",
      "display": "Arrow reads and writes columnar CSV data.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Does csv need a separate pip install?",
      "display": "csv belongs to Python’s distributed standard library.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Does pandas low_memory return data in chunks?",
      "display": "The complete file still returns as one DataFrame; use chunksize or iterator for returned chunks.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Does pandas parallel CSV parsing require the pyarrow engine?",
      "display": "Current pandas also documents parallel C-engine reading for sufficiently large files.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Is read_csv().lazy() equivalent to scanning a CSV lazily?",
      "display": "Polars read_csv().lazy() materializes the file first and prevents reader-level pushdown; use scan_csv.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Does Arrow incremental CSV reading use multiple threads?",
      "display": "Arrow currently documents its incremental reader as single-threaded regardless of the use_threads option.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Why can a later Arrow batch fail type conversion?",
      "display": "Incremental CSV type inference uses the first block and freezes types afterwards; declare column_types when needed.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Can Polars return results as a stream of batches?",
      "display": "LazyFrame.collect_batches evaluates in streaming mode and returns chunks.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Can Polars return results as a stream of batches?",
      "display": "The method is explicitly unstable and can change without a breaking release.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Why do identifiers with leading zeros become numbers?",
      "display": "Arrow’s own CSV example preserves leading-zero codes by declaring the column as string.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Why do identifiers with leading zeros become numbers?",
      "display": "Python csv itself leaves fields as strings unless its numeric quoting option is enabled.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "Library name, pandas",
      "display": "pandas",
      "asOf": "2026-11-20"
    },
    "F127": {
      "label": "Monthly downloads, pandas",
      "display": "710.3M",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "License, pandas",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Package release, pandas",
      "display": "3.1.1",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Package release date, pandas",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Install, pandas",
      "display": "pip install pandas",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Quickstart, pandas",
      "display": "import pandas as pd\nfrom io import StringIO\nframe = pd.read_csv(StringIO(\"name,score\\nAda,9\\n\"))\n",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Repository stars, pandas",
      "display": "49.6K",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "CSV type inference, pandas",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Chunked CSV reading, pandas",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Reader result role, pandas",
      "display": "DataFrame; optional TextFileReader chunks",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Project function, pandas",
      "display": "def load(self) -> pd.DataFrame:\n    load_path = str(self._get_load_path())\n    if self._protocol == \"file\":\n        # file:// protocol seems to misbehave on Windows\n        # (<urlopen error file not on local host>),\n        # so we don't join that back to the filepath;\n        # storage_options also don't work with local paths\n        return pd.read_csv(load_path, **self._load_args)\n\n    load_path = f\"{self._protocol}{PROTOCOL_DELIMITER}{load_path}\"\n    return pd.read_csv(\n        load_path, storage_options=self._storage_options, **self._load_args\n    )\n",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Project source file, pandas",
      "display": "kedro-datasets/kedro_datasets/pandas/csv_dataset.py",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Project full_name, pandas",
      "display": "kedro-org/kedro-plugins",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Project stargazers_count, pandas",
      "display": "121",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Library name, pyarrow",
      "display": "pyarrow",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Monthly downloads, pyarrow",
      "display": "437.8M",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "License, pyarrow",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Package release, pyarrow",
      "display": "26.0.1",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Package release date, pyarrow",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Install, pyarrow",
      "display": "pip install pyarrow",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Quickstart, pyarrow",
      "display": "from pyarrow import csv\ntable = csv.read_csv(\"data.csv\")\n",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Repository stars, pyarrow",
      "display": "17.3K",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "CSV type inference, pyarrow",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Chunked CSV reading, pyarrow",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Reader result role, pyarrow",
      "display": "Arrow Table or CSVStreamingReader RecordBatches",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Project function, pyarrow",
      "display": "def _read_stream(self, f: \"pyarrow.NativeFile\", path: str) -> Iterator[Block]:\n    import pyarrow as pa\n    from pyarrow import csv\n\n    # Re-init invalid row handler: https://issues.apache.org/jira/browse/ARROW-17641\n    if hasattr(self.parse_options, \"invalid_row_handler\"):\n        self.parse_options.invalid_row_handler = (\n            self.parse_options.invalid_row_handler\n        )\n\n    filter_expr = (\n        self._predicate_expr.to_pyarrow()\n        if self._predicate_expr is not None\n        else None\n    )\n\n    try:\n        reader = csv.open_csv(\n            f,\n            read_options=self.read_options,\n            parse_options=self.parse_options,\n            **self.arrow_csv_args,\n        )\n        schema = None\n        while True:\n            try:\n                batch = reader.read_next_batch()\n                table = pa.Table.from_batches([batch], schema=schema)\n                if schema is None:\n                    schema = table.schema\n                if filter_expr is not None:\n                    table = table.filter(filter_expr)\n\n                yield table\n            except StopIteration:\n                return\n    except pa.lib.ArrowInvalid as e:\n        raise ValueError(\n            f\"Failed to read CSV file: {path}. \"\n            \"Please check the CSV file has correct format, or filter out non-CSV \"\n            \"file with 'partition_filter' field. See read_csv() documentation for \"\n            \"more details.\"\n        ) from e\n",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Project source file, pyarrow",
      "display": "python/ray/data/_internal/datasource/csv_datasource.py",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Project full_name, pyarrow",
      "display": "ray-project/ray",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Project stargazers_count, pyarrow",
      "display": "44.3K",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Library name, duckdb",
      "display": "DuckDB",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Monthly downloads, duckdb",
      "display": "81.2M",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "License, duckdb",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Package release, duckdb",
      "display": "2.0.0",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Package release date, duckdb",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Install, duckdb",
      "display": "pip install duckdb",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Quickstart, duckdb",
      "display": "import duckdb\nrelation = duckdb.read_csv(\"data.csv\")\n",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Official description, duckdb",
      "display": "Runs DuckDB as an in-process database.",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Quickstart source file, duckdb",
      "display": "clients/python/reference/",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Repository stars, duckdb",
      "display": "206",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "CSV type inference, duckdb",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Chunked CSV reading, duckdb",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Reader result role, duckdb",
      "display": "SQL-queryable DuckDBPyRelation",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Project function, duckdb",
      "display": "def scan_csv(\n    self, source: NormalizedSource, *, separator: str = \",\", **kwds: Any\n) -> DuckDBLazyFrame:\n    validate_separators(separator, (\"delimiter\", \"delim\", \"sep\"), kwds)\n    native = duckdb.read_csv(source, delimiter=separator, **kwds)\n    return self._lazyframe.from_native(native, context=self)\n",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Project source file, duckdb",
      "display": "src/narwhals/_duckdb/namespace.py",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Project full_name, duckdb",
      "display": "narwhals-dev/narwhals",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Project stargazers_count, duckdb",
      "display": "1.8K",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Library name, polars",
      "display": "Polars",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Monthly downloads, polars",
      "display": "68.7M",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "License, polars",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Package release, polars",
      "display": "2.1.0",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Package release date, polars",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Install, polars",
      "display": "pip install polars",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Quickstart, polars",
      "display": "import polars as pl\nframe = pl.read_csv(\"data.csv\")\n",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Repository stars, polars",
      "display": "40.3K",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "CSV type inference, polars",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Chunked CSV reading, polars",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Reader result role, polars",
      "display": "DataFrame eager or LazyFrame scan",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Project function, polars",
      "display": "def scan_csv(\n    self, source: NormalizedSource, *, separator: str = \",\", **kwds: Any\n) -> PolarsLazyFrame:\n    native = (\n        pl.read_csv(source, separator=separator, **kwds).lazy()\n        if self._read_eagerly(source)\n        else pl.scan_csv(source, separator=separator, **kwds)\n    )\n    return self._lazyframe.from_native(native, context=self)\n",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Project source file, polars",
      "display": "src/narwhals/_polars/namespace.py",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Project full_name, polars",
      "display": "narwhals-dev/narwhals",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Project stargazers_count, polars",
      "display": "1.8K",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Library name, dask",
      "display": "Dask",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Monthly downloads, dask",
      "display": "31.6M",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "License, dask",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Package release, dask",
      "display": "2026.8.0",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Package release date, dask",
      "display": "Aug 2026",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Install, dask",
      "display": "pip install dask",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Quickstart, dask",
      "display": "import dask.dataframe as dd\nframe = dd.read_csv(\"data/*.csv\")\n",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Official description, dask",
      "display": "Parallelizes PyData workloads with task scheduling.",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Quickstart source file, dask",
      "display": "generated/dask.dataframe.read_csv.html",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Repository stars, dask",
      "display": "14.0K",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "CSV type inference, dask",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Chunked CSV reading, dask",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Reader result role, dask",
      "display": "Lazy partitioned DataFrame",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Project function, dask",
      "display": "def _safe_load_csv(path: str, **kwargs: Any) -> dd.DataFrame:\n    if not isfile(path):\n        return dd.read_csv(join(path, \"*.csv\"), **kwargs)\n    try:\n        return dd.read_csv(path, **kwargs)\n    except (IsADirectoryError, PermissionError):  # pragma: no cover\n        return dd.read_csv(join(path, \"*.csv\"), **kwargs)\n",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Project source file, dask",
      "display": "fugue_dask/_io.py",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Project full_name, dask",
      "display": "fugue-project/fugue",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Project stargazers_count, dask",
      "display": "2.2K",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Library name, tablib",
      "display": "Tablib",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Monthly downloads, tablib",
      "display": "5.8M",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "License, tablib",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Package release, tablib",
      "display": "3.10.0",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Package release date, tablib",
      "display": "Jul 2026",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Install, tablib",
      "display": "pip install tablib",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Quickstart, tablib",
      "display": "import tablib\ndata = tablib.Dataset().load(\"name,score\\nAda,9\\n\", format=\"csv\")\n",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Official description, tablib",
      "display": "Handles tabular data in many formats, including XLS, JSON, YAML, and CSV.",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Quickstart source file, tablib",
      "display": "api.html",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Repository stars, tablib",
      "display": "4.8K",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "CSV type inference, tablib",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Chunked CSV reading, tablib",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Reader result role, tablib",
      "display": "Materialized Dataset",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Project function, tablib",
      "display": "def read(self, **kwargs):\n    \"\"\"Read csv format\n\n    :return: Dataset object\n    \"\"\"\n    with open(self.file) as file:\n        return tablib.Dataset().load(file, **kwargs)\n",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Project source file, tablib",
      "display": "pyreports/io.py",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Project full_name, tablib",
      "display": "MatteoGuadrini/pyreports",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Project stargazers_count, tablib",
      "display": "114",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Library name, clevercsv",
      "display": "CleverCSV",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Monthly downloads, clevercsv",
      "display": "1.1M",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "License, clevercsv",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Package release, clevercsv",
      "display": "0.8.5",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Package release date, clevercsv",
      "display": "May 2026",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Install, clevercsv",
      "display": "pip install clevercsv",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Quickstart, clevercsv",
      "display": "import clevercsv\nrows = clevercsv.read_table('./imdb.csv')\n",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Official description, clevercsv",
      "display": "Reads messy CSV files.",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Quickstart source file, clevercsv",
      "display": "docs/README.rst",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Repository stars, clevercsv",
      "display": "1.3K",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "CSV type inference, clevercsv",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Chunked CSV reading, clevercsv",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Reader result role, clevercsv",
      "display": "Detected dialect and row lists/generators; optional Pandas DataFrame",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Project function, clevercsv",
      "display": "def copy_datafile_to_table(\n    user,\n    data_file_id,\n    table_name,\n    schema_oid,\n    conn,\n    comment=None,\n    import_into_temp_table=False,\n    header_to_validate=[]\n):\n    data_file = DataFile.objects.get(id=data_file_id, user=user)\n    header = data_file.header\n    dialect = csv.dialect.SimpleDialect(\n        data_file.delimiter,\n        data_file.quotechar,\n        data_file.escapechar\n    )\n    table_name = table_name or data_file.base_name\n\n    with data_file.file.open(\"rb\") as raw:\n        f = io.TextIOWrapper(raw, encoding=data_file.encoding, newline=\"\")\n        reader = csv.reader(f, dialect)\n        first_row = next(reader)\n        if header:\n            if import_into_temp_table:\n                assert list(enumerate(first_row)) == header_to_validate, \"Parsing mismatch\"\n            column_names = _process_column_names(first_row)\n            rows = reader\n        else:\n            column_names = [\n                f\"{COLUMN_NAME_TEMPLATE}{i}\" for i in range(len(first_row))\n            ]\n            # The first row is data, not a header: chain it back in\n            rows = itertools.chain([first_row], reader)\n        processed_rows = ([None if val == '' else val for val in row] for row in rows)\n        import_info = create_and_import_from_rows(\n            processed_rows,\n            table_name,\n            schema_oid,\n            column_names,\n            conn,\n            comment=comment,\n            import_into_temp_table=import_into_temp_table\n        )\n\n    return {\n        \"oid\": import_info['table_oid'],\n        \"name\": import_info.get('table_name'),\n        \"renamed_columns\": import_info.get('renamed_columns'),\n        \"pkey_column_attnum\": import_info.get('pkey_column_attnum'),\n    }\n",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Project source file, clevercsv",
      "display": "mathesar/imports/datafile.py",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Project full_name, clevercsv",
      "display": "mathesar-foundation/mathesar",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Project stargazers_count, clevercsv",
      "display": "5.2K",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Library name, petl",
      "display": "petl",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Monthly downloads, petl",
      "display": "1.1M",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "License, petl",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Package release, petl",
      "display": "1.7.33",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Package release date, petl",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Install, petl",
      "display": "pip install petl",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Quickstart, petl",
      "display": "import petl as etl\ntable = etl.fromcsv(\"data.csv\")\nrows = list(table)\n",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Official description, petl",
      "display": "Extracts, transforms, and loads tables of data.",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Quickstart source file, petl",
      "display": "petl/io/csv.py",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Repository stars, petl",
      "display": "1.3K",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "CSV type inference, petl",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Chunked CSV reading, petl",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Reader result role, petl",
      "display": "Lazy iterable Table of string fields",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Project function, petl",
      "display": "def read_raw(self, file):\n    return etl.fromcsv(\n        file,\n        encoding=getattr(self, \"file_encoding\", None),\n        delimiter=getattr(self, \"csv_delimiter\", \",\"),\n    )\n",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Project source file, petl",
      "display": "beancount_reds_importers/libreader/csvreader.py",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Project full_name, petl",
      "display": "redstreet/beancount_reds_importers",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Project stargazers_count, petl",
      "display": "166",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python CSV libraries csv pandas Polars PyArrow code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
