#๐Ÿ”’ dataframe not callable

24 messages ยท Page 1 of 1 (latest)

vestal meadow
#

what am i doing wrong exactly?

radiant portalBOT
#

@vestal meadow

Python help channel opened

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.

vestal meadow
#

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

cosmic venture
#

!code send your code

radiant portalBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

vestal meadow
cosmic venture
#

this is not the whole code

#

I don't see where coinbase_live_orderbook is defined

vestal meadow
#

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

cosmic venture
#

it's a function that returns a dataframe? or coinbase_live_orderbook is a dataframe?

vestal meadow
#

function that returns a dataframe

cosmic venture
#

looks like it's just a dataframe pithink

vestal meadow
#

i did:

cosmic venture
#

according to the error

#

where is the import from

vestal meadow
#

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?

radiant portalBOT
#
Python help channel closed

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.