Google Git
Sign in
apache / datafusion-python / refs/heads/branch-32 / . / examples
tree: 7a9c03da50c0e9fe534f14f1951423aa3846a5a3 [path history] [tgz]
  1. chart.png
  2. create-context.py
  3. dataframe-parquet.py
  4. export.py
  5. import.py
  6. python-udaf.py
  7. python-udf.py
  8. query-pyarrow-data.py
  9. README.md
  10. sql-on-cudf.py
  11. sql-on-pandas.py
  12. sql-on-polars.py
  13. sql-parquet-s3.py
  14. sql-parquet.py
  15. sql-to-pandas.py
  16. sql-using-python-udaf.py
  17. sql-using-python-udf.py
  18. substrait.py
examples/README.md

DataFusion Python Examples

Some examples rely on data which can be downloaded from the following site:

  • https://www.nyc.gov/site/tlc/about/tlc-trip-record-data.page

Here is a direct link to the file used in the examples:

  • https://d37ci6vzurychx.cloudfront.net/trip-data/yellow_tripdata_2021-01.parquet

Creating a SessionContext

  • Creating a SessionContext

Executing Queries with DataFusion

  • Query a Parquet file using SQL
  • Query a Parquet file using the DataFrame API
  • Run a SQL query and store the results in a Pandas DataFrame
  • Query PyArrow Data

Running User-Defined Python Code

  • Register a Python UDF with DataFusion
  • Register a Python UDAF with DataFusion

Substrait Support

  • Serialize query plans using Substrait

Executing SQL against DataFrame Libraries (Experimental)

  • Executing SQL on Polars
  • Executing SQL on Pandas
  • Executing SQL on cuDF
Powered by Gitiles| Privacy| Termstxt json