CSVΒΆ

Reading a csv is very straightforward with SessionContext.read_csv()

from datafusion import SessionContext

ctx = SessionContext()
df = ctx.read_csv("file.csv")

An alternative is to use SessionContext.register_csv()

ctx.register_csv("file", "file.csv")
df = ctx.table("file")