cryptocurrency-price-prediction icon indicating copy to clipboard operation
cryptocurrency-price-prediction copied to clipboard

TypeError: unsupported operand type(s) for /: 'str' and 'str'

Open javadhaditaghi opened this issue 4 years ago • 9 comments

train, test, X_train, X_test, y_train, y_test = prepare_data(
    hist, target_col, window_len=window_len, zero_base=zero_base, test_size=test_size)

unfortunately, I confront this error when running the above code.

TypeError: unsupported operand type(s) for /: 'str' and 'str'

Is there any way to get rid of it?

javadhaditaghi avatar Mar 31 '21 11:03 javadhaditaghi

I would like to help with this issue if no one's assigned.

NovusEdge avatar Mar 31 '21 11:03 NovusEdge

@NovusEdge go for it

abhinavsagar avatar Mar 31 '21 12:03 abhinavsagar

@abhinavsagar Could you please mention a more verbose error message Also, please mention the lines that show the error in the code.

NovusEdge avatar Mar 31 '21 12:03 NovusEdge

train, test, X_train, X_test, y_train, y_test = prepare_data(
    hist, target_col, window_len=window_len, zero_base=zero_base, test_size=test_size)

不幸的是,我在运行上面的代码时遇到了这个错误。

TypeError:/的不支持的操作数类型:“ str”和“ str”

有什么办法摆脱它吗? 我遇到了同样的问题

Wu-Lin avatar Apr 08 '21 07:04 Wu-Lin

same issue ! https://prnt.sc/117axsb

robertsmaoui avatar Apr 08 '21 11:04 robertsmaoui

Hey guys, I just checked @abhinavsagar article and I tried to run his code. Most probably the dataset changed and it now has 2 extra string columns. Just drop 'conversionType' and 'conversionSymbol' and it works.

teoad95 avatar Apr 24 '21 20:04 teoad95

Hey guys, I just checked @abhinavsagar article and I tried to run his code. Most probably the dataset changed and it now has 2 extra string columns. Just drop 'conversionType' and 'conversionSymbol' and it works.

Hi! Thanks that was the problem :D I dropped these two this way and it is working now :D image

davidfegyver avatar Apr 25 '21 12:04 davidfegyver

Hey guys, I just checked @abhinavsagar article and I tried to run his code. Most probably the dataset changed and it now has 2 extra string columns. Just drop 'conversionType' and 'conversionSymbol' and it works.

Hi! Thanks that was the problem :D I dropped these two this way and it is working now :D image

You can try to use hist.drop('conversionType',axis='columns', inplace=True), instead of using the loop you implemented. I think you can even drop both with hist.drop(['conversionType','conversionType' ],axis='columns', inplace=True) but I am not sure.

teoad95 avatar Apr 25 '21 14:04 teoad95

@teoad95 Thanks this is working fine

Abbasa5251 avatar Jun 16 '21 17:06 Abbasa5251