MCPcopy Create free account
hub / github.com/apache/arrow / push_data

Function push_data

python/examples/flight/client.py:77–86  ·  view source on GitHub ↗
(args, client, connection_args={})

Source from the content-addressed store, hash-verified

75
76
77def push_data(args, client, connection_args={}):
78 print('File Name:', args.file)
79 my_table = csv.read_csv(args.file)
80 print('Table rows=', str(len(my_table)))
81 df = my_table.to_pandas()
82 print(df.head())
83 writer, _ = client.do_put(
84 pyarrow.flight.FlightDescriptor.for_path(args.file), my_table.schema)
85 writer.write_table(my_table)
86 writer.close()
87
88
89def get_flight(args, client, connection_args={}):

Callers

nothing calls this directly

Calls 6

lenFunction · 0.85
read_csvMethod · 0.45
headMethod · 0.45
do_putMethod · 0.45
write_tableMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected