Add command line argument to csv printing script
This commit is contained in:
parent
fdcc35174f
commit
6be539f738
@ -2,8 +2,13 @@ import pandas as pd
|
|||||||
import shimatta_label.label_image as li
|
import shimatta_label.label_image as li
|
||||||
import shimatta_label.brother_ql_wrapper as ql_wrapper
|
import shimatta_label.brother_ql_wrapper as ql_wrapper
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
medir = os.path.dirname(__file__)
|
medir = os.path.dirname(__file__)
|
||||||
|
|
||||||
|
if len(sys.argv) > 2:
|
||||||
|
example_data_path = sys.argv[1]
|
||||||
|
else:
|
||||||
example_data_path = os.path.join(medir, 'labels.csv')
|
example_data_path = os.path.join(medir, 'labels.csv')
|
||||||
|
|
||||||
df = pd.read_csv(example_data_path, converters={i: str for i in range(3)})
|
df = pd.read_csv(example_data_path, converters={i: str for i in range(3)})
|
||||||
|
Loading…
Reference in New Issue
Block a user