|
@@ -4,7 +4,6 @@ from signal import signal, SIGPIPE, SIG_DFL
|
4
|
4
|
import pandas as p
|
5
|
5
|
|
6
|
6
|
def main():
|
7
|
|
- signal(SIGPIPE, SIG_DFL) # Prevent broken pipe errors when piping to less or head
|
8
|
7
|
parser = ArgumentParser(description='Transform a "pickle" to a csv file')
|
9
|
8
|
parser.add_argument(dest="input", help = "input pickle path", type = FileType('rb'))
|
10
|
9
|
parser.add_argument(dest="output", nargs="?", help = "output csv path", type = FileType('w'))
|
|
@@ -27,6 +26,7 @@ def main():
|
27
|
26
|
print(ptc.info())
|
28
|
27
|
print("Saving as csv")
|
29
|
28
|
|
|
29
|
+ signal(SIGPIPE, SIG_DFL) # Prevent broken pipe errors when piping to less or head
|
30
|
30
|
ptc.to_csv(args.output, index = args.rownames)
|
31
|
31
|
|
32
|
32
|
|