probcomp / BayesDB

A Bayesian database table for querying the probable implications of data as easily as SQL databases query the data itself. New implementation in http://github.com/probcomp/bayeslite
http://probcomp.csail.mit.edu/software/bayesdb/
Apache License 2.0
891 stars 52 forks source link

Pandas input output #19

Closed mdec closed 10 years ago

mdec commented 10 years ago

Allows creation of btable from a pandas DataFrame, for example:

client('CREATE BTABLE example FROM PANDAS', pandas_df = example)

Also outputs pandas DataFrame(s) by default, where appropriate, instead of pretty-print string or Python dict. If one BQL statement is submitted, a single DataFrame is returned. If multiple statements are submitted, a list of DataFrames is returned.

To turn off pandas DataFrame output, set argument pandas_output = False. Pretty-printing the result is still on by default, but the string is never returned now.