feat(code): Output data as csv to stdout on script run
When running data python script (`src/data.py`) directly through the command line, we now use pandas to output the collected data directly as a csv to stdout. Can then be redirected to e.g. a file to save the data in csv format.
This commit is contained in:
parent
73b96a757a
commit
38099c3358
1 changed files with 5 additions and 3 deletions
|
@ -39,6 +39,8 @@ if __name__ == "__main__":
|
||||||
else:
|
else:
|
||||||
res = from_yml()
|
res = from_yml()
|
||||||
|
|
||||||
print(res)
|
from io import StringIO
|
||||||
# print out tsv file instead
|
output = StringIO()
|
||||||
# print(to_tsv(load_yaml.load(DEFAULT_YAML_PATH)))
|
res.to_csv(output)
|
||||||
|
output.seek(0)
|
||||||
|
print(output.read())
|
||||||
|
|
Loading…
Reference in a new issue