#๐ dataframe not callable
24 messages ยท Page 1 of 1 (latest)
@vestal meadow
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Retrieved 1043 rows of historical data
Calculating volatility...
Calculated Volatility (sigma): 0.9707039273728322
Retrieving live order book data...
Traceback (most recent call last):
File "/home/ec2-user/bep/tracking/bot/strategy.py", line 149, in <module>
execute_optimal_trading_strategy(product_id, quantity, time_horizon, gamma, b, dt)
File "/home/ec2-user/bep/tracking/bot/strategy.py", line 95, in execute_optimal_trading_strategy
live_orderbook = coinbase_live_orderbook(product_id)
TypeError: 'DataFrame' object is not callable
!code send your code
oh those are imports
it returns a dataframe
that looks like this:
there were a lot of imports and i didn't want to distract from the error at hand
it's a function that returns a dataframe? or coinbase_live_orderbook is a dataframe?
function that returns a dataframe
looks like it's just a dataframe 
i did:
oh i see it now, i defined it as itself. as in i wrote a function then i did coinbase_live_orderbook = coinbase_live_orderbook(my_params) and then when i imported it into this new script it, it was reading the dataframe itself and not the function. i fixed that, and now have the bigger issue
the other script where the coin_live_orderbook function is coming from when i run that script by itself there's no errors, and i've tested that each function works
anyone got any ideas?
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.