Skip to content

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

@akshat-21

Description

@akshat-21

I have converted the programs to be compatible with python 3.5 and am getting the following error:
Traceback (most recent call last):
File "markets.py", line 40, in
pystocks.performFeatureSelection(maxdeltas, maxlags, fout, cut, start_test, path_datasets, savemodel, method, folds, parameters)
File "C:\Users\student\Desktop\stock\pystocks.py", line 321, in performFeatureSelection
datasets = applyRollMeanDelayedReturns(datasets, delta)
File "C:\Users\student\Desktop\stock\pystocks.py", line 144, in applyRollMeanDelayedReturns
addFeatures(dataset, adjclose, returns, n)
File "C:\Users\student\Desktop\stock\pystocks.py", line 128, in addFeatures
dataframe[return_n] = dataframe[adjclose].pct_change(n)
TypeError: unsupported operand type(s) for /: 'str' and 'float'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions