diff --git a/openbb_terminal/economy/economy_controller.py b/openbb_terminal/economy/economy_controller.py index 12f87ef4250..2a6bb319542 100644 --- a/openbb_terminal/economy/economy_controller.py +++ b/openbb_terminal/economy/economy_controller.py @@ -1716,7 +1716,12 @@ class EconomyController(BaseController): add_help=False, formatter_class=argparse.ArgumentDefaultsHelpFormatter, prog="eval", - description="""Create custom data column from loaded datasets.""", + description="""Create custom data column from loaded datasets. Can be mathematical expressions supported + by pandas.eval() function. + + Example. If I have loaded `fred dgs2 dgs5` and I want to create a new column that is the difference + between these two, I can create a new column by doing `eval spread = dgs2 - dgs5` + """, ) parser.add_argument( "-q", @@ -1724,6 +1729,7 @@ class EconomyController(BaseController): type=str, nargs="+", dest="query", + help="Query to evaluate on loaded datasets", ) if other_args and "-" not in other_args[0][0]: other_args.insert(0, "-q") diff --git a/website/content/terminal/economy/eval/_index.md b/website/content/terminal/economy/eval/_index.md index 55233bed797..803c4e4cc85 100644 --- a/website/content/terminal/economy/eval/_index.md +++ b/website/content/terminal/economy/eval/_index.md @@ -1,13 +1,14 @@ ``` usage: eval [-q QUERY [QUERY ...]] [-h] [--export EXPORT] ``` -Create custom data column from loaded datasets. +Create custom data column from loaded datasets. Can be mathematical expressions supported by pandas.eval() function. +Example. If I have loaded `fred dgs2 dgs5` and I want to create a new column that is the difference between these two, +I can create a new column by doing `eval spread = dgs2 - dgs5`. -Note that for division, the / operator will cause issues, so one should do `*N**-1` where N is the number you are dividing by +Note that for division, the / operator will cause issues, so one should do `*N**-1` where N is the number you are dividing by ``` options: -q QUERY [QUERY ...], --query QUERY [QUERY ...] -h, --help show this help message (default: False) --export EXPORT Export raw data into csv, json, xlsx (default: ) ``` -For more information and examples, use 'about eval' to access the related guide.