-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
.buy_and_hold float series conversion error #32
Comments
Hi @victor,is what you're trying to do convert series to float? if so,i think you keep getting the error because you did not import pandas;much as you have it installed, you still have to import it; |
Hi @Hackingforlife thanks for the answer. I tried as you suggested but still have the same error. Regarding your question, I just used I think that the conversion that provokes the error is inside Stocker code, in particular it is this line that shows in the error message: I will update as soon as I have more info. Thanks! |
You're welcome........Will definitely be waiting for updates.
…On Sun, Jan 27, 2019 at 11:59 AM Victor ***@***.***> wrote:
Hi @Hackingforlife <https://github.com/Hackingforlife> thanks for the
answer. I tried as you suggested but still have the same error.
Regarding your question, I just used microsoft.buy_and_hold(start_date='2018-01-01',
end_date='2018-01-16', nshares=100) that contains a conversion of some
columns. It is in the library so I didn't try to convert explicitly. I can
not offer more info for now until I deep more into the code, as I only
skimmed through it briefly.
I think that the conversion that provokes the error is inside Stocker
code, in particular it is this line that shows in the error message:
start_price = float(self.stock[self.stock['Date'] == start_date]['Adj.
Open'])
I will update as soon as I have more info. Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#32 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AfHvDEQr7QI5fsUuXH2EgGw-f3OM0P1Wks5vHWpzgaJpZM4aJttv>
.
|
Updated the repo and checked the libs and the error dissapeared. Probably it was something I typed wrong. Although, for future references, there is still this warning
|
Running the first examples of Stocker I got this error regarding float conversion of time series.
It seems related to pandas, the version I have is 0.23.4 as I installed dependencies using conda-forge to make it work (a lot of problems from fbprophet came when I tried to use pip). I will try to find a way to fix this and report back here, but any help will be appreciated as I am quite new to Pandas (and Python in general).
The text was updated successfully, but these errors were encountered: