Ejemplo n.º 1
0
def main():
    with Session(host="localhost", port=10000) as dh_session:
        taxi_data_table = import_taxi_records(dh_session)
        bottom_5_fares_table = demo_chained_table_ops(taxi_data_table)

        # download the table to the client in the form of pyarrow table and convert it into a Pandas DataFrame
        snapshot_data = bottom_5_fares_table.snapshot()
        df = snapshot_data.to_pandas()

        pd.set_option("max_columns", 20)
        print(df)
Ejemplo n.º 2
0
def main():
    with Session(host="localhost", port=10000) as dh_session:
        taxi_data_table = import_taxi_records(dh_session)
        variable_name = "t"
        dh_session.bind_table(taxi_data_table, variable_name)

        bottom_5_fares_table = run_script(dh_session=dh_session)
        snapshot_data = bottom_5_fares_table.snapshot()
        df = snapshot_data.to_pandas()

        pd.set_option("max_columns", 20)
        print(df)
Ejemplo n.º 3
0
def main():
    with Session(host="localhost", port=10000) as dh_session:
        taxi_data_table = import_taxi_records(dh_session)

        top_5_fares_table = demo_query(dh_session=dh_session, taxi_data_table=taxi_data_table)
        bottom_5_fares_table = demo_chained_table_ops(taxi_data_table)

        combined_fares_table = dh_session.merge_tables(tables=[top_5_fares_table, bottom_5_fares_table])
        snapshot_data = combined_fares_table.snapshot()
        df = snapshot_data.to_pandas()

        pd.set_option("max_columns", 20)
        print(df)