Code Duplication    Length = 10-10 lines in 2 locations

tabpy/tabpy_server/app/arrow_server.py 1 location

@@ 74-83 (lines=10) @@
71
        print("Error calling action:", e)
72
73
74
def push_data(args, client, connection_args={}):
75
    print('File Name:', args.file)
76
    my_table = csv.read_csv(args.file)
77
    print('Table rows=', str(len(my_table)))
78
    df = my_table.to_pandas()
79
    print(df.head())
80
    writer, _ = client.do_put(
81
        pyarrow.flight.FlightDescriptor.for_path(args.file), my_table.schema)
82
    writer.write_table(my_table)
83
    writer.close()
84
85
86
def upload_data(client, data, filename, metadata=None):

tabpy/tabpy_server/handlers/arrow_client.py 1 location

@@ 74-83 (lines=10) @@
71
        print("Error calling action:", e)
72
73
74
def push_data(args, client, connection_args={}):
75
    print('File Name:', args.file)
76
    my_table = csv.read_csv(args.file)
77
    print('Table rows=', str(len(my_table)))
78
    df = my_table.to_pandas()
79
    print(df.head())
80
    writer, _ = client.do_put(
81
        pyarrow.flight.FlightDescriptor.for_path(args.file), my_table.schema)
82
    writer.write_table(my_table)
83
    writer.close()
84
85
86
def upload_data(client, data, filename, metadata=None):