robdmc / pandashells

:panda_face: Bringing the python data stack to the shell prompt
Other
791 stars 26 forks source link

Add json input/output capability #10

Closed robdmc closed 9 years ago

vielmetti commented 9 years ago

I'd recommend looking at the jq package as one way to get JSON input/output; it at the very minimum does a good job of going from CSV to JSON and vice versa.

https://github.com/stedolan/jq

robdmc commented 9 years ago

Yes. I love jq. The cool thing about Pandashells being a command line tool, is that it's super simple to do stuff like:

cat file.json | jq [your options here] | p.df [your options here]

Adding json to support to Pandashells should be super easy though, and it might be nice to do things like: cat in_file.json | p.df 'df.groupby(by=["account"]).invoice.sum()' -i json -o json > out_file.json

robdmc commented 9 years ago

implemented