-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added an option to only select required fields #36
base: master
Are you sure you want to change the base?
Conversation
resolves #35 |
Hi @varnitsingh, Thanks for submitting this PR! This not only resolves #35 but is definitely going to be a useful feature. However, I think this needs a bit more discussion around the implementation... Some initial thoughts/questions I have are...
Let me know what you think. |
if len(sys.argv) > 4: | ||
for i in range(4,len(sys.argv)): | ||
acceptable_keys.append(sys.argv[i]) | ||
print('Only copying from: ',end='') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is throwing syntax error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try removing end=''
. See if that works. There is a issue sometimes with the python linter.
Answering your questions
|
added an option to only add selected fields to the csv files by specifying fields after the path arguments
python json_to_csv.py <node> <json_in_file_path> <csv_out_file_path> <field1> <field2>